Lasso and Soft Thresholding

Solve a one-dimensional penalized regression and see how the absolute-value penalty can set a coefficient exactly to zero.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. The derivative changes character at zero
  2. Correlation complicates interpreting selected features

The derivative changes character at zero

Minimize \(\tfrac12(z-\beta)^2+\lambda|\beta|\) for one coordinate after an appropriate scaling. For positive \(\beta\), stationarity gives \(\beta=z-\lambda\). For negative \(\beta\), it gives \(z+\lambda\). The zero solution is optimal when \(z\) lies in \([-\lambda,\lambda]\), using the subgradient interval there. The result moves a magnitude toward zero, erasing it when it is small enough.

Correlation complicates interpreting selected features

With orthonormal feature columns, these one-coordinate problems separate. For correlated predictors, changing one coefficient changes the others’ residual signals. Sparsity can help prediction or interpretation, but selecting one of several correlated variables does not alone identify a cause. Ridge regression usually shrinks rather than zeroing coordinates. Cross-validation can tune the penalty under the intended generalization split.[1][2]

References

  1. Gareth James et al., An Introduction to Statistical Learning ↩
  2. Trevor Hastie, Robert Tibshirani and Jerome Friedman, The Elements of Statistical Learning ↩