Rescuing a Singular Fit with Ridge

Linear Algebra for MLHard+30 XP+30

Rescuing a Singular Fit with Ridge

A model is handed a design matrix whose second feature is simply the first one doubled — a length recorded in two different units. No intercept column was added:

X=(122436),y=(257)X = \begin{pmatrix} 1 & 2 \\ 2 & 4 \\ 3 & 6 \end{pmatrix}, \qquad y = \begin{pmatrix} 2 \\ 5 \\ 7 \end{pmatrix}X=​123​246​​,y=​257​​

The plain normal equations cannot be solved here. Ridge regression repairs this by adding λI\lambda IλI to the Gram matrix before inverting:

wridge=(X⊤X+λI)−1X⊤yw_{\text{ridge}} = \left(X^\top X + \lambda I\right)^{-1} X^\top ywridge​=(X⊤X+λI)−1X⊤y

With λ=30\lambda = 30λ=30, what is wridgew_{\text{ridge}}wridge​?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.