Why is the intercept term typically excluded from the regularization penalty?
Last updated
The intercept is just a constant baseline shift: it doesn't add complexity or fit noise, so penalizing it gives no generalization benefit.
Penalizing it would make results depend on the target's arbitrary origin (e.g. Celsius vs. Kelvin) and collapse strongly regularized predictions to 0 instead of the mean of y.
Typically X and y are centered and the intercept recovered as
b = ȳ − x̄ᵀw. Some solvers (e.g.liblinear) do penalize it.