Question: The table below provides a training data set containing six observations, three pre- dictors, and one qualitative response variable (Y = color Blue or

The table below provides a training data set containing six observations, three

The table below provides a training data set containing six observations, three pre- dictors, and one qualitative response variable (Y = color "Blue" or color "Red"). Obs. 1 2 3 4 5 6 Suppose we wish to use K-nearest neighbors to work with this data set. (a) Use K = 1 to predict the color (either "Blue" or "Red"), using the K-nearest neighbor predictions of color for each of the training observations. What is the average misclassification training error? X X2 X3 Y 1 2 -1 Blue 1 0 3 Blue 0 3 0 Red 0 2 -1 Red 2 0 -1 Blue 1 4 1 Red (b) Use K = 3 to calculate the K-nearest neighbor predictions for all the training observations. What is the average misclassification training error? (c) Suppose we wish to use this data set to make a prediction for Y when xo = (X1, X2, X3), with X X2 X3 = 0, using K-nearest neighbors. = = i. Compute the Euclidean distance between each observation and the test point, X X2 = X3 = 0. ii. What is our prediction with K = 1? Why? iii. What is our prediction with K = 3? Why? iv. What is our prediction with K = 5? Why?

Step by Step Solution

3.38 Rating (145 Votes )

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!