Question: ( 1 ) ( 6 points ) Based on the training data, implement 5 - fold cross - validation ( CV ) to select the
points Based on the training data, implement fold crossvalidation CV to select the best KNN model with the smallest CV error from different KNN mod els under different K values, such as K and WhatistheoptiamlKfortheselected model? Based on the selected model, compute the confusion matrices and the misclassification error rates for both the training data and test data, respectively. Hint: please refer to sample code cvknnR in the same "Exams" subfolder of CANVAS Files and certain level of customization is needed. cvknnR im plements slide of lecture In your problem, set your random seed as when you i split training data into folds, and ii make predictions using KNN models
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
