Question: For the remaining problems, you need to use the R code in the file to generate a set of training data. 2. For the KNN
For the remaining problems, you need to use the R code in the file to generate a set of training data.
2. For the KNN classifier that we discussed in the class (i) Implement a cross-validation scheme select the optimal tuning parameter k, i.e., find the optimal number of nearest neighbors. (ii) Estimate the EPE for your optimal k using the training data (iii) Perform a hold-out validation procedure by simulating a new dataset according to the true generative model and re-calculating the prediction error for the estimated optimal k.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
