How can ridge regression be reproduced as ordinary least squares on an augmented dataset?
Last updated
Append p pseudo-rows
√λ·Ito X and p zeros to y. The augmented RSS equals||y − Xw||² + λ||w||², so OLS returns the ridge solution.The normal equations become
(XᵀX + λI)w = Xᵀy. Each pseudo-row is a fake observation saying a coefficient should be 0.This reuses any OLS solver (e.g. QR for numerical stability). Leave the intercept unpenalized, and generalize to Tikhonov with
√λ·Γ.