Deriving the solution for ridge polynomial regression.

56 Views Asked by At

We have the following loss function: $$\operatorname{Err}(x)=\frac{1}{n}\sum_{i=1}^n(h_w(x_i)-y_i)^2+ λ\|w\|^2$$

  1. I need to derive the solution for a polynomial of degree $0$ ($h_w(x)=w_0$) and analyze the solution for $\lambda \rightarrow 0 $ and $\lambda \rightarrow \infty$.

  2. I need to do the same for a polynomial of degree $1$ ($h_w(x)=w_0+w_1x$) by computing the derivatives of $w_0$ and $w_1$ and analyze the solution for $\lambda \rightarrow 0 $ and $\lambda \rightarrow \infty$ for each of those derivatives.