The test set consists of two samples, (0, 1,0) and (0,0,0). i. Calculate the predicted labels for the test set using the K Nearest Neighbours algorithm with Euclidean distance for K = 2.[6 marks] ii. Now you are told that the true labels of the test samples (0,1,0) and(0,0,0) are 1 and 0, respectively. Calculate the test TSS, test RSS, andtest R² for your predictions. What does the value of test R² tell you aboutthe quality of the predictions?[7 marks] iii. Which method would you use to compute the test R² in scikit-learn?[1 mark]
Fig: 1
Fig: 2
Fig: 3
Fig: 4
Fig: 5
Fig: 6
Fig: 7
Fig: 8
Fig: 9
Fig: 10
Fig: 11