L2 is ridge, and it penalizes the sum of squared coefficients.
L1 (LASSO) | L2 (RIDGE) |
---|---|
Differentiable exept at zero | Easily differentiable |
Will zero out coefficients that don’t contribute | Will penalize greater coefficients more |
Used for feature selection | Used for feature regularization |