Solutions for w and a
If we take the gradient of J in terms of w, we can solve for w to get

Now consider the expression for J in terms of a and take the gradient

Linear regression in terms of the kernel
Substitute the solution for a back into the linear regression model

