Why should you standardise the features before fitting ridge or lasso regression, but not necessarily before ordinary least squares?

Supervised learning, Regularisation
Level L1 Beginner. Length One-liner. Nature Th Theoretical.

What's being asked

Whether you see that the penalty depends on the scale of each coefficient while the least-squares fit does not.

Key idea

The penalty λ∥β∥2 (or λ∥β∥1) treats all coefficients alike, but a feature measured in small units needs a large coefficient, so it is penalised unfairly. OLS predictions are unchanged by rescaling a feature.

Steps

  1. State that rescaling a feature by c rescales its coefficient by 1/c, so OLS fitted values stay the same.
  2. Note that the penalty is not scale-free: a feature in metres versus millimetres gets a coefficient 1000 times bigger and a much heavier penalty.
  3. Conclude: centre and scale each feature to mean 0 and variance 1 (and do not penalise the intercept), so the penalty is applied fairly.

Common mistakes

How long your answer should be

One or two sentences.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: What is the perceptron learning rule for labels yi∈{−1,+1}, and how does one update move the prediction in the right direction?
Next in Supervised learning: How does Adaline (trained with the delta or LMS rule) differ from the perceptron, in the quantity used for the update and in the loss being minimised?