In the KNN algorithm, what is the role of the parameter "weights" when determining the class label of a new data point?
-
A
It assigns equal weight to all neighbors
-
B
It assigns higher weight to closer neighbors
Correct answer
-
C
It assigns higher weight to farther neighbors
-
D
It has no impact on the algorithm
Correct answer
B. It assigns higher weight to closer neighbors
17 views
Explanation
The "weights" parameter in the KNN algorithm assigns higher weight to closer neighbors, giving them more influence in the decision-making process.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ