Lasso
1. Idea
Lasso uses penalty for automatic feature selection:
Diamond-shaped constraint pushes many exactly to 0.
2. Ridge vs Lasso
| Ridge () | Lasso () | |
|---|---|---|
| Penalty | sum of | sum of |
| Effect | shrinks | shrinks + zeroes |
| Solution | closed form | iterative (no closed form) |
| Use | correlated features | sparse selection |
3. Geometry (one line)
ball has corners on axes — optimum hits corner → some weights 0. ball is smooth — optimum rarely on axis.
4. Practice
Standardize features first ( is scale-sensitive). Pick by CV. Elastic Net mixes both: best when huge + correlated.
5. Exam Points
- Lasso objective + sparsity — 5 marks, very frequent.
- Ridge vs Lasso table + diagram — 5 marks, very frequent.
- Why no closed form (need subgradient / coordinate descent) — 3 marks.