Try: Push λ high - watch Lasso set β₁ to exactly 0 (sparsity). Ridge shrinks it but never zeros it. Drag outlier points to see how each method responds.
Regression Explorer - Interactive Visualization
OLS minimizes sum of squared residuals. Ridge adds L2 penalty λ·||β||². Lasso adds L1 penalty λ·||β||₁. This visualization fits all three to the same data simultaneously, showing how regularization shrinks coefficients and reduces overfitting. Dragging data points shows sensitivity; adjusting λ shows the bias-variance tradeoff.
Drag data points and watch all three regression lines update
Adjust λ slider to see Ridge shrink coefficients, Lasso zero them out
See residuals as vertical dashed lines from each point to fit
Compare R², RSS for OLS vs Ridge vs Lasso
Understand how regularization trades bias for reduced variance
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.