Question: Consider the training and test data posted on eLearning in the files 1-tranining-data.csv and 1-test-data.csv, respectively, for a classification problem with two classes. (a) Fit

Consider the training and test data posted on eLearning in the files 1-tranining-data.csv and 1-test-data.csv, respectively, for a classification problem with two classes.

(a) Fit KNN with K = 1, 6, . . . , 200.

(b) Plot training and test error rates against K. Explain what you observe. Is it consistent with what you expect from the class?

(c) What is the optimal value of K? What are the training and test error rates associated with the optimal K?

(d) Make a plot of the training data that also shows the decision boundary for the optimal K. Comment on what you observe.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!