Quant Memo
Core

Elastic Net Regularization

Elastic net blends Lasso's ability to zero out useless features with Ridge's ability to handle correlated ones, fixing the specific failure mode each penalty has on its own.

Lasso regression shrinks some coefficients all the way to zero, which is great for automatically discarding useless features — but when several features are highly correlated, Lasso tends to pick one almost arbitrarily and zero out the rest, even if they were all genuinely useful. Ridge regression handles correlated features gracefully, shrinking them all together, but it never zeroes anything out, so it can't do feature selection on its own.

Elastic net combines both penalties in one objective:

minβ  Loss(β)+λ[αβ1+(1α)β22]\min_\beta \; \text{Loss}(\beta) + \lambda \left[ \alpha \|\beta\|_1 + (1-\alpha) \|\beta\|_2^2 \right]

In words: minimize the usual prediction error, plus a penalty that's a weighted mix of Lasso's absolute-value penalty and Ridge's squared penalty, where α\alpha dials between the two extremes — α=1\alpha=1 is pure Lasso, α=0\alpha=0 is pure Ridge.

Elastic net exists specifically to fix Lasso's weak spot with correlated predictors: the Ridge term encourages correlated features to keep similar, nonzero coefficients together instead of Lasso arbitrarily crushing all but one of them to zero.

Worked example. A model has two nearly identical, highly correlated predictors (e.g. two ways of measuring firm size). Pure Lasso, fit once, might set one coefficient to 0.9 and the other to exactly 0 — a coin-flip outcome that changes with small data perturbations. Elastic net with α=0.5\alpha = 0.5 on the same data tends to split the effect between them, giving both a moderate positive coefficient (e.g. 0.45 each), which is both more stable across resamples and more faithful to the fact that both variables genuinely carry the same signal.

Related concepts

Further reading

  • Zou & Hastie, 'Regularization and Variable Selection via the Elastic Net' (2005)
ShareTwitterLinkedIn