Penalized least-squares estimator (source code)

= Penalized least-squares estimator
{title2=$\widehat\theta\in\arg\min_\theta\{\|y-X\theta\|_2^2/n+\lambda J(\theta)\}$}

A penalized least-squares estimator balances squared error with a nonnegative penalty $J$. The <Lasso> uses the coefficient $\ell_1$ <norm>; <graph total variation denoising> uses the $\ell_1$ <norm> of endpoint differences. The choice of normalization of the squared loss changes the numerical tuning parameter.