What happens if all the neighbors have the same class label in the KNN algorithm?
-
A
The algorithm assigns the majority class label to the new data point
Correct answer
-
B
The algorithm assigns the class label of the closest neighbor to the new data point
-
C
The algorithm assigns a random class label to the new data point
-
D
The algorithm assigns a weighted class label based on the distance to the neighbors
Correct answer
A. The algorithm assigns the majority class label to the new data point
15 views
Explanation
If all the neighbors have the same class label, the KNN algorithm assigns the majority class label to the new data point.
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ