Ordinary least squares (OLS) fits a linear model by minimizing squared prediction errors. It treats model fitting as an unregularized learning problem: squared loss controls fit, while no penalty controls complexity. section 7.1.1
OLS is useful for continuous-valued targets, but its unregularized coefficients can become unstable when features are highly correlated. Ridge, LASSO, and elastic net retain squared loss while adding different penalties. section 7.1.1 section 7.5
Noisy synthetic regression
Generate 100 one-feature examples from a noisy version of f(x) = -2.5x + 3.2, fit OLS alongside Ridge, LASSO, and elastic net, then compare predictions on held-out data. With two correlated features, the OLS coefficients become unstable relative to regularized alternatives.



