What is lasso regression?

Quick Overview

Asks what lasso regression is and how its L1 penalty changes linear regression. Tests the objective and the role of lambda, why coefficients become exactly zero, fitting by coordinate descent or LARS, choosing lambda by cross-validation, and pitfalls with scaling and correlated features.

What is lasso regression?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is lasso regression? Describe its objective, what makes it different from ordinary least squares, how it is fit, and what to watch for when using it. ```hint Look at the penalty's shape Compare how $|\beta|$ and $\beta^2$ behave near zero, and think about what that does to a small coefficient. ``` ### What a Strong Answer Covers - The objective function and the role of λ, including its two extremes - Why the L1 penalty sets some coefficients exactly to zero - How the model is fit and how λ is chosen - Practical issues: feature scaling, the p > n case, correlated features and shrinkage bias, with the usual remedies ### Follow-up Questions - Why does ridge regression shrink coefficients without ever setting them exactly to zero? - How would you get valid confidence intervals for coefficients selected by the lasso? - How does elastic net change the lasso's behavior when two features are almost identical? - What does the lasso path computed by LARS show, and how would you use it?

Overview: Asks what lasso regression is and how its L1 penalty changes linear regression. Tests the objective and the role of lambda, why coefficients become exactly zero, fitting by coordinate descent or LARS, choosing lambda by cross-validation, and pitfalls with scaling and correlated features.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

What is lasso regression? Describe its objective, what makes it different from ordinary least squares, how it is fit, and what to watch for when using it.

What a Strong Answer Covers Guidance

  • The objective function and the role of λ, including its two extremes
  • Why the L1 penalty sets some coefficients exactly to zero
  • How the model is fit and how λ is chosen
  • Practical issues: feature scaling, the p > n case, correlated features and shrinkage bias, with the usual remedies

Follow-up Questions Guidance

  • Why does ridge regression shrink coefficients without ever setting them exactly to zero?
  • How would you get valid confidence intervals for coefficients selected by the lasso?
  • How does elastic net change the lasso's behavior when two features are almost identical?
  • What does the lasso path computed by LARS show, and how would you use it?