How would you choose the L1/L2 mixing ratio in elastic net?

Last updated 3 November 2026

  • Treat the mixing ratio (l1_ratio) as a hyperparameter and tune it jointly with λ by cross-validation over a grid weighted toward 1 (e.g. 0.1 to 1), e.g. with ElasticNetCV.

  • Use priors to shape the grid: strong correlation or p ≫ n favors lower α (more L2). Needing a small, interpretable model favors high α. Break flat-CV ties toward the simpler or more stable model.

  • Standardize features and reuse the same folds across α values. Very small l1_ratio values are numerically unreliable, so use Ridge instead.

  • https://www.krishnaik.in/ai-tutorials/machine-learning/elasticnet-regression
  • https://dev.to/harsimranjit_singh_0133dc/elastic-net-regularization-balancing-between-l1-and-l2-penalties-3ib7
  • https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.ElasticNetCV.html
All Regularization interview questions