Problem 3: Given our objective function Ein = -(wxXw - 2WXy + yy), we obtained the gradient of Ein as:
∇Ein(w) = xTxw - xTy
To help you understand how we compute the gradient of Ein in linear regression, prove that:
∇wwAw = A + Aw
In this equation, A is a matrix of size (d+1) by (d+1), and w is the weight vector of size (d+1) by 1. This will help you see how we obtain the first item in the gradient.