Machine learningMachine learningAlgorithm

Elastic Net

Also known as: Elastic Net Regresyon, elastic net regression, ElasticNet, L1/L2 regularized regression

OriginatorZou, H. & Hastie, T.Year2005Sources1Related methods11

Elastic Net is a regularized linear regression method introduced by Zou and Hastie in 2005 that blends the LASSO (L1) and Ridge (L2) penalties, so it performs variable selection and coefficient shrinkage at the same time. It is designed for predictive and explanatory modelling on data with many, possibly correlated, predictors.

Key highlights

  • Combines LASSO variable selection with Ridge shrinkage in a single model.
  • Handles correlated predictors gracefully, tending to keep or drop them as groups.
  • Works when the number of features exceeds the number of observations.
  • Distribution-light: does not require normally distributed outcomes and handles continuous, binary, and count features.

Intuition

This section is available to Pro members. Upgrade to Pro

How it works

This section is available to Pro members. Upgrade to Pro

When to use it

Use Elastic Net for prediction or explanation on continuous, binary, or count outcomes when you have many predictors — especially correlated ones or more features than observations — and want automatic variable selection together with shrinkage. It assumes a roughly linear relationship and that features have been normalized. You need at least about 30 observations so that both hyperparameters can be tuned by cross-validation; below that, plain LASSO or Ridge is safer.

Strengths & limitations

Strengths
  • Combines LASSO variable selection with Ridge shrinkage in a single model.
  • Handles correlated predictors gracefully, tending to keep or drop them as groups.
  • Works when the number of features exceeds the number of observations.
  • Distribution-light: does not require normally distributed outcomes and handles continuous, binary, and count features.
Limitations
  • Assumes an approximately linear relationship between predictors and outcome.
  • Features must be normalized first, or the penalty unfairly favours large-scale variables.
  • Two hyperparameters (penalty strength and L1/L2 ratio) must be tuned, needing more cross-validation data than single-penalty methods.
  • On small samples (n below about 30) the L1/L2 mixing ratio is unstable to optimize.

Common pitfalls

This section is available to Pro members. Upgrade to Pro

Applications

This section is available to Pro members. Upgrade to Pro

Frequently asked

How is Elastic Net different from LASSO and Ridge?

LASSO uses only the L1 penalty (selection but unstable with correlated predictors); Ridge uses only the L2 penalty (stable shrinkage but never drops variables). Elastic Net blends both, controlled by a mixing ratio, so it selects variables and stays stable with correlated features.

Do I need to scale my features?

Yes. The penalty acts on the size of the coefficients, so features must be normalized first; otherwise large-scale variables are penalized differently and the selection is biased.

How many observations do I need?

At least about 30. Elastic Net tunes two hyperparameters by cross-validation, so it needs more data than single-penalty methods. Below 30, use plain LASSO if you need selection or Ridge if you need shrinkage.

What do the two hyperparameters control?

The overall penalty strength (λ) controls how much the coefficients are shrunk, and the mixing ratio (l1_ratio) sets the balance between the L1 selection penalty and the L2 shrinkage penalty. Both are chosen by cross-validation.

Sources

  1. 1.
    Zou, H. & Hastie, T. (2005). Regularization and Variable Selection via the Elastic Net. Journal of the Royal Statistical Society: Series B, 67(2), 301–320.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 1). Elastic Net. ScholarGate. https://scholargate.app/machine-learning/elastic-net