When would you prefer linear regression over a more flexible model like a random forest or gradient boosting?

Quick Overview

Asks when you would pick linear regression over a random forest or gradient boosting model. Tests bias-variance reasoning, the value of interpretable coefficients and inference, behavior outside the training range, and judgment about when a flexible model is worth its cost.

When would you prefer linear regression over a more flexible model like a random forest or gradient boosting?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

When would you prefer linear regression over a more flexible model like a random forest or gradient boosting? ```hint Start from bias and variance Ask how much bias a linear model really has on the problem, and how much variance a flexible model adds given the amount of data you have. ``` ```hint Look past held-out accuracy List what the people using the model need besides a good validation score, then check which model can provide each item. ``` ### What a Strong Answer Covers - What linear coefficients give you for interpretation and statistical inference, and their limits. - Bias-variance reasoning for near-linear signals and for small or noisy datasets. - How each model behaves on inputs outside the training range. - Operational and regulatory considerations. - When the flexible model is the better choice, and how to make the call with data. ### Follow-up Questions - A linear model and a gradient boosting model score within 1% of each other on validation. Which do you ship, and what else do you check? - How can you add nonlinearity to a linear model and keep it interpretable? - Do SHAP values on a boosted model give you the same thing as regression coefficients with standard errors? - You have 50 rows and 200 features. What would you fit, and why?

Overview: Asks when you would pick linear regression over a random forest or gradient boosting model. Tests bias-variance reasoning, the value of interpretable coefficients and inference, behavior outside the training range, and judgment about when a flexible model is worth its cost.

Nov 25, 2026
mediumData ScientistOtherMachine Learning
0
0

When would you prefer linear regression over a more flexible model like a random forest or gradient boosting?

What a Strong Answer Covers Guidance

  • What linear coefficients give you for interpretation and statistical inference, and their limits.
  • Bias-variance reasoning for near-linear signals and for small or noisy datasets.
  • How each model behaves on inputs outside the training range.
  • Operational and regulatory considerations.
  • When the flexible model is the better choice, and how to make the call with data.

Follow-up Questions Guidance

  • A linear model and a gradient boosting model score within 1% of each other on validation. Which do you ship, and what else do you check?
  • How can you add nonlinearity to a linear model and keep it interpretable?
  • Do SHAP values on a boosted model give you the same thing as regression coefficients with standard errors?
  • You have 50 rows and 200 features. What would you fit, and why?