TGViewer
Data Analytics & AI | SQL Interviews | Power BI Resources Data Analytics & AI | SQL Interviews | Power BI Resources @data_visual · 27.5K subscribers
Post #615 739
Data Science Interview Questions with Answers

What’s the difference between random forest and gradient boosting?

Random Forests builds each tree independently while Gradient Boosting builds one tree at a time.
Random Forests combine results at the end of the process (by averaging or "majority rules") while Gradient Boosting combines results along the way.

What happens to our linear regression model if we have three columns in our data: x, y, z  —  and z is a sum of x and y?

We would not be able to perform the regression. Because z is linearly dependent on x and y so when performing the regression  would be a singular (not invertible) matrix.

Which regularization techniques do you know?

There are mainly two types of regularization,

L1 Regularization (Lasso regularization) - Adds the sum of absolute values of the coefficients to the cost function.
L2 Regularization (Ridge regularization) - Adds the sum of squares of coefficients to the cost function

Here, Lambda determines the amount of regularization.

How does L2 regularization look like in a linear model?

L2 regularization adds a penalty term to our cost function which is equal to the sum of squares of models coefficients multiplied by a lambda hyperparameter.

This technique makes sure that the coefficients are close to zero and is widely used in cases when we have a lot of features that might correlate with each other.

What are the main parameters in the gradient boosting model?

There are many parameters, but below are a few key defaults.

learning_rate=0.1 (shrinkage).
n_estimators=100 (number of trees).
max_depth=3.
min_samples_split=2.
min_samples_leaf=1.
subsample=1.0.

Data Science Resources: https://whatsapp.com/channel/0029Va8v3eo1NCrQfGMseL2D
  • ❤ 2
More from @data_visual
  1. Oct 2, 2026Data Analyst Roadmap
  2. Sep 28, 2026🎯 GigaChat 3.5 Reasoning: 5 Key Features 1️⃣ Advanced Reasoning: Explores multiple step-b…
  3. Sep 23, 2026🚀 The 10 Levels of AI Agents — Where We Stand Today AI isn’t a single goal — it’s an evol…
  4. Sep 14, 2026AI tools to increase your productivity in 2026 👇 1/ Granola: AI meeting notes that captur…
  5. Sep 6, 2026Data Analyst interviews will be easier if you learn these tools in sequence: ➤ 𝗗𝗮𝘁𝗮 𝗙…
  6. Aug 29, 2026SQL Joins — A Practical Cheatsheet for Professionals If you’re working with relational dat…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →