KNN Regression
Consider a single dimension. Obtain N = 100 iid samples of x uniformly randomly between1 and 10. The corresponding y values are obtained as the logarithm of x plus a Gaussiannoise (mean 0, standard deviation 0.1). Now use K-NN regression (for each of the followingthree schemes, and with K = 1, 3, 50 for each scheme) to obtain estimates of y at x-values of1, 3, […]