Lasso Regression Studio
The exact same synthetic dataset as the Ridge Regression Studio — same correlated features, same λ range — but solved with real coordinate descent and soft-thresholding, matching Lasso Regression, In Full Depth's own derivation and Python implementation exactly. The two Studios' regularization paths are meant to be compared side by side, not read in isolation.
Interactive
Lasso Regression Studio
x1 = 2.205x2 = 3.803x3 = 0.053x4 = 1.649
MSE 1.5220 of 4 features zeroed out
Drag λ up from 0 and watch coefficients hit exactly zero (not just shrink toward it) at different thresholds -- x3 (genuinely irrelevant) drops first, then x4. Compare which of x1/x2 survives longest to the Ridge Studio, where correlated features shrink together instead of one being arbitrarily dropped.
The exact same synthetic dataset as the Ridge Regression Studio -- same features, same correlation, same lambda range -- but solved with real coordinate descent and soft-thresholding instead of a closed form, so the two regularization paths are honestly comparable.
What to Try
- Drag λ up from 0 and watch
x3(genuinely irrelevant, true weight 0) snap to exactly zero at a fairly low λ — not asymptotically shrink like Ridge, but actually hit and stay at 0. The readout even labels it "(dropped)". - Keep going and watch
x4(weakly informative) drop too, whilex1andx2(both strongly informative but correlated) survive much longer. - Now open the Ridge Regression Studio in another tab with the same Correlation setting. Ridge shrinks
x1andx2together, smoothly, toward each other — Lasso instead tends to keep one and crush the other toward zero, arbitrarily favoring whichever one the data's noise happens to slightly favor. Regenerate the dataset (New Dataset) a few times and watch which ofx1/x2"wins" change — that instability is exactly the caveat Lasso, In Full Depth calls out about correlated features. - Watch the "features zeroed out" counter climb as λ increases — a live count of Lasso silently doing feature selection.
Back to Visual Lab Overview.