Statistical Decision Theory and Bayesian Learning · Machine Learning

Lasso

1. Idea

Lasso uses L1L₁ penalty for automatic feature selection:

J=∣∣y−Xw∣∣2+λ sum ∣wi∣J = ||y - Xw||² + λ \text{ sum } |w_{i}|

Diamond-shaped constraint pushes many wiw_{i} exactly to 0.

2. Ridge vs Lasso

Ridge (L2L₂) Lasso (L1L₁)
Penalty sum of wi2w_{i}² sum of ∣wi∣|w_{i}|
Effect shrinks shrinks + zeroes
Solution closed form iterative (no closed form)
Use correlated features sparse selection
Ridge: circleLasso: diamond → corners = sparsity\text{Ridge: circle} \quad \quad \text{Lasso: diamond → corners = sparsity}

3. Geometry (one line)

L1L₁ ball has corners on axes — optimum hits corner → some weights 0. L2L₂ ball is smooth — optimum rarely on axis.

4. Practice

Standardize features first (L1L₁ is scale-sensitive). Pick λλ by CV. Elastic Net mixes both: best when dd 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.
Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.

← All Machine Learning modules