aNet.ai
Machine Learning/Learning path
0day streak0XP · Lv 1
← 3. Learning & Generalization
Lesson 9 of 11 9 min · 93 words

Ridge regression

Least squares with an L2 penalty.

Ridge regression is least squares with an L2 penalty: . It has a closed-form solution:

Adding makes the matrix always invertible, which fixes problems when features are highly correlated (multicollinearity) or when there are more features than examples. Ridge shrinks all weights smoothly towards zero but rarely makes any exactly zero.

Formula to remember

Lasso objective

L1 penalty sets some weights exactly to zero.

Quick check · +5 XP

Increasing model complexity typically…

Practice this topic
Saved in this browser as you type.
aNet.ai · Introduction to Machine Learning · NewUU course outlineProgress saved in this browser