Walkthrough 1 · 1:03 · /regularisation
Shrinkage
Drag log λ and watch ridge and lasso paths, the cross-validation curve and test error respond.
Steps and transcript
- 10:00Ridge regression on 263 Hitters players. λ starts at the 2023 cross-validated λmin, 300.9.
- 20:05Drag log λ: every ridge coefficient shrinks smoothly towards zero, but none reaches it.
- 30:19Switch to the lasso: its ℓ₁ penalty sets coefficients to exactly zero, one at a time.
- 40:32Jump to the lasso's λmin, 4.468: 13 of 19 predictors are kept, as in the 2023 PDF.
- 50:38The 10-fold CV curve (±1 SE band) and test MSE against OLS follow the same slider.
- 60:562026 upgrade: a paired bootstrap over the 132 test players. Every difference's 95% interval includes zero.