Repaso
Español

Which regularization penalty can push some coefficients of a linear model to exactly zero?

Options

  1. L2 (ridge)
  2. Both do it equally
  3. L1 (lasso) (Correct option)
  4. Neither: regularization only makes coefficients smaller, never zero

Answer

L1 (lasso)

Why

L1 adds the sum of absolute coefficient values to the loss. Its shape pushes weak features to exactly zero, so it also works as a form of feature selection.

L2 adds the sum of squares. It shrinks all coefficients toward zero but rarely makes them exactly zero.

Elastic net mixes the two.

Remember

L1 gives sparse models; L2 shrinks smoothly.

Key terms

Practice this question in Repaso