L1 regularization adds the sum of absolute parameter values to the squared-loss objective. Increasing this penalty shrinks weights and can drive some exactly to zero, producing a sparse model with implicit feature selection. section 7.1.1
A useful diagnostic is a regression problem with highly correlated features. Compared with OLS, LASSO can discard one feature while retaining predictive performance, whereas ridge shrinks correlated weights without necessarily eliminating them.
LASSO on correlated features
Split the two-feature dataset into training and test sets, fit Lasso(alpha=0.5), then evaluate MSE and mean absolute error. The displayed model learns coefficients [-0.0, -0.79809073], setting one coefficient to zero; its test MSE is 2.832 and MAD is 1.304.





