lasso Algorithm

Though originally specify for least squares, lasso regularization is easily extended to a wide variety of statistical models including generalized linear models, generalized estimate equations, proportional hazards models, and M-estimators, in a straightforward style. Lasso was originally formulated for least squares models and this simple case reveals a substantial amount about the behavior of the estimator, including its relationship to ridge regression and best subset choice and the connections between lasso coefficient estimates and so-named soft thresholding.

lasso source code, pseudocode and analysis