Ridge normal equations and effect

Problem

Derive the minimizer of

Xwy22+λw22\lVert X\mathbf{w}-\mathbf{y}\rVert_2^2+\lambda\lVert\mathbf{w}\rVert_2^2

for λ>0\lambda>0. State how increasing λ\lambda typically changes coefficient magnitude and training fit.

Reveal answer or reference solution

w=(XX+λI)1Xy.\mathbf{w}=(X^\top X+\lambda I)^{-1}X^\top\mathbf{y}.

Increasing λ\lambda shrinks coefficients and usually worsens training fit while potentially improving generalization.

Local history

Loading attempts saved in this browser…

Use with your agent

Share this URL and your attempt. Ask the agent to start with a clarifying question or the smallest useful hint.

Tutor me on https://mlprep.iwase.dev/machine-learning/regression/original-ml-ridge/. If window.mlPrepAgent is available, read attempts for item original-ml-ridge before tutoring. Inspect my attempt, keep the item ID, and do not reveal the full answer first. After a real attempt, append its record and read it back.

Appears in