In Chapter 6 we will see how to extend linear smoothers to higher dimensions. Some smoothers, however, are easy to extend in a naïve way. For example, one could replace the absolute value in Equation 4.10 with the `2-distance between points. Write a function kernel_reg_2d that extends kernel_reg to two-dimensional input matrices x and x_new. Test your function on data distributed as y = cos(x1) + x 2 2 under Gaussian noise.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here