One-dimensional ridge estimate

Problem

With no intercept, fit y^=wx\hat{y}=wx to (1,1)(1,1) and (2,3)(2,3) by minimizing

J(w)=12∑i(wxi−yi)2+λ2w2J(w)=\frac{1}{2}\sum_i(wx_i-y_i)^2+\frac{\lambda}{2}w^2

with λ=2\lambda=2. Derive the minimizer and compare it with the unregularized estimate.

Reveal answer or reference solution

The derivative is

J′(w)=(12+22+2)w−(1⋅1+2⋅3)=7w−7,J'(w)=(1^2+2^2+2)w-(1\cdot1+2\cdot3)=7w-7,

so the ridge estimate is w=1w=1. The unregularized estimate is 75=1.4\frac{7}{5}=1.4. The penalty shrinks the coefficient toward zero. At w=1w=1, the data term is 12\frac{1}{2}, the penalty is 11, and J=32J=\frac{3}{2}.

Outcome

Previous attempts

Loading attempts saved in this browser…

    Review Screening Results