What is Elastic Net regularization?

Last updated 3 November 2026

Elastic net adds a weighted mix of L1 and L2 penalties to the loss. It keeps lasso's sparsity while adding ridge's stability and its tendency to group correlated features together.

  • Objective:

    • Loss + λ[α||β||₁ + (1−α)/2·||β||₂²].

    • λ sets the overall strength. α sets the mix: α = 1 is lasso, α = 0 is ridge.

    • In scikit-learn, alpha is λ and l1_ratio is α.

  • What the L1 part gives: Exact zeros, so the model performs feature selection.

  • What the L2 part gives:

    • Strict convexity, so the solution is unique even when p > n or features are collinear.

    • A grouping effect: highly correlated features get similar coefficients instead of lasso's arbitrary pick-one behavior.

    • It can select more than n features.

  • Practical notes:

    • Standardize features first, because both penalties are scale-sensitive.

    • The original "naive" elastic net (Zou & Hastie, 2005) shrinks twice, so the authors rescale coefficients by (1 + λ₂).

    • Fit with coordinate descent along a λ path (glmnet, sklearn.linear_model.ElasticNet).

  • https://medium.com/@amitmaurya5033/ridge-lasso-regression-30-interview-questions-with-follow-ups-8a13d23e0ce2
  • https://blog.stackademic.com/top-20-regularization-interview-questions-and-answers-4e0639957713
  • https://www.geeksforgeeks.org/machine-learning/machine-learning-interview-questions/
All Regularization interview questions