Ridge regression uses L2 to shrink coefficients without eliminating them

Why do some roads get smoother and straighter over time?

Image: NoMore201, CC BY-SA 4.0, via Wikimedia Commons

Ridge regression uses L2 to shrink coefficients without eliminating them

Why do some roads get smoother and straighter over time?

Imagine you're driving a car on a winding mountain road. Over time, the road gets smoother and straighter as people drive over it, making it easier to drive.

Just like the road gets smoother, ridge regression smooths out the bumps in a road map filled with lots of twists and turns (highly correlated variables). It does this by adding a tiny bit of extra weight to the turns (L2 regularization), making the overall path smoother and easier to follow.

Example

If the road twists 10 times in one mile, ridge regression might add a small weight to each twist, making it 9.8 times instead of 10, smoothing out the path.

Remember this

Ridge regression adds a tiny bit of extra weight (L2 regularization) to smooth out the path (reduce the impact of highly correlated variables) without removing any twists (coefficients).

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath