Question: Here is a short dataset consisting of a binary outcome variable y and four independent variables x1, x2, x3, and x4. The independent variables are

 Here is a short dataset consisting of a binary outcome variable

Here is a short dataset consisting of a binary outcome variable y and four independent variables x1, x2, x3, and x4. The independent variables are all comparable in scale, so for this exercise you need not normalize. Record x1 12 13 x4 y 1 3 5 2 1 1 2 1 4 5 3 0 3 2 2 4 3 1 4 2 3 5 S 1 5 4 1 3 O 0 The questions below walk through the use of k-NN to predict the yvalue for a new record with (x1, x2, x3, x4)=(2,3,1,2). Distance is calculated in the Euclidean sense. To execute kNN you will need the distances of the new record to every record in the Training set. Some of those values appear in the following table, for which you will need to fill in the empty slots. Record Distance y 1 2.65 1 2 4.36 0 3 3.32 1 4 ? 1 S ?? O 1. What is the Euclidean distance between the new record and Record 4 in the Training set? 2. What is the Euclidean distance between the new record and Record 5 in the Training set? 3. If the k-NN algorithm uses k=3, the y-values of which of the records would n_ot be examined in predicting the y-value for the new record? 4. If this is a classication problem and the k-NN algorithm uses k=3, what is the predicted y-value for the new record? 5. If this is an estimation problem and the k-N N algorithm uses k=3, what is the predicted y-value for the new record? 6. If the k-NN algorithm instead uses k=1, what is the predicted y-value for the new record

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!