Ridge & Lasso

A flexible model can fit accidental details in the training data. Penalising large coefficients gives us a way to discourage that behaviour, with ridge and lasso making different kinds of adjustment.

17 sections · 15 questions · 4 coding challenges

1 / 17

Why Can a Small Change in the Data Produce Huge Coefficients?

BOTIE

When two inputs carry nearly the same information, a regression can give one a large positive coefficient and the other a large negative coefficient. Their contributions largely cancel. Predictions on the observed data may look reasonable, even though small changes to those data produce very different coefficients.

Hoerl and Kennard examined this instability in their 1970 ridge regression paper. They accepted some bias in exchange for more stable estimates by penalising large coefficients. Tibshirani's 1996 lasso paper combined shrinkage with variable selection: its different penalty could set some coefficients exactly to zero.

Both methods make the model pay for coefficient size as well as prediction error. Ridge discourages large coefficients smoothly. Lasso can remove a contribution entirely. We are choosing a compromise, so the penalty strength needs evaluation on data beyond the fitting sample. Neither penalty can tell us, by itself, which variables are causes.

Sources for this history