When would you prefer elastic net over pure lasso?

Quick Overview

Asks when elastic net is a better choice than pure lasso for a regularized linear model. Tests understanding of how the L1 penalty handles correlated features, the selection limit when features outnumber samples, the stability of the selected set, and how to tune the L1/L2 mix.

When would you prefer elastic net over pure lasso?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

When would you prefer elastic net over pure lasso? ```hint Think about groups of features Consider what the L1 penalty does when several features carry almost the same information, and what adding an L2 term changes about that. ``` ### What a Strong Answer Covers - How lasso behaves on a group of highly correlated features, and how elastic net's L2 term changes that - The limit on how many features lasso can select when there are more features than samples - Stability of the selected feature set across resamples and retrains - Cases where pure lasso is still the better choice - How to let the data pick the L1/L2 mix instead of guessing ### Follow-up Questions - Why does the L2 term push correlated features toward similar coefficients? - How would you tune both elastic net hyperparameters, and what does the coefficient path look like as the penalty grows? - Why do lasso and elastic net need standardized features? - If you already know which features form groups, how does group lasso compare with elastic net?

Overview: Asks when elastic net is a better choice than pure lasso for a regularized linear model. Tests understanding of how the L1 penalty handles correlated features, the selection limit when features outnumber samples, the stability of the selected set, and how to tune the L1/L2 mix.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

When would you prefer elastic net over pure lasso?

What a Strong Answer Covers Guidance

  • How lasso behaves on a group of highly correlated features, and how elastic net's L2 term changes that
  • The limit on how many features lasso can select when there are more features than samples
  • Stability of the selected feature set across resamples and retrains
  • Cases where pure lasso is still the better choice
  • How to let the data pick the L1/L2 mix instead of guessing

Follow-up Questions Guidance

  • Why does the L2 term push correlated features toward similar coefficients?
  • How would you tune both elastic net hyperparameters, and what does the coefficient path look like as the penalty grows?
  • Why do lasso and elastic net need standardized features?
  • If you already know which features form groups, how does group lasso compare with elastic net?