Karush-Kuhn-Tucker conditions for the Lasso
= Karush-Kuhn-Tucker conditions for the Lasso
{c}
{title2=$X^{\mathsf T}(Y-Xb)/n\in\lambda\partial\|b\|_1$}
For the <Lasso> criterion $\|Y-Xb\|_2^2/(2n)+\lambda\|b\|_1$, the displayed <subgradient optimality condition> is necessary and sufficient. A nonzero coefficient has residual score $\lambda\operatorname{sign}(b_k)$, and a zero coefficient has residual score in $[-\lambda,\lambda]$. The <subdifferential of the L1 norm> supplies both cases.