Norms: L1, L2 & Regularization

Measuring length — and penalizing it in ridge and lasso

40 min · interactive lesson with runnable code and 4 graded exercises.

What you'll be able to do

  • Compute L1 and L2 norms and state the norm properties
  • Explain why L2 punishes spikes and L1 doesn't
  • Contrast ridge and lasso: zeros, correlated features, closed form
  • Scale features and tune λ properly

The full lesson is free with an account.

L2 and L1

Disk vs diamond

Ridge (L2) and lasso (L1)

Choosing λ and scaling

Other norms you'll hear