lasso() — Lasso regression

Regression that shrinks some coefficients all the way to zero.

lasso(lambda, X, y)

Key idea

Definition

the penalty strength
the L1 size of the coefficients
the coefficients (some become exactly 0)

In plain words

Ridge turns the volume down on every coefficient; the lasso mutes the useless ones completely.

Where you'd use it

Frequently asked questions

What’s special about lasso?
Its L1 penalty can shrink coefficients exactly to 0, doing automatic feature selection.