1. Home
  2. Data Science
  3. K-Nearest Neighbors (KNN)
  4. In the KNN algorithm, what is the role of the parameter…

Added 1 May 2024

In the KNN algorithm, what is the role of the parameter "weights" when determining the class label of a new data point?

  1. It assigns equal weight to all neighbors
  2. It assigns higher weight to closer neighbors Correct answer
  3. It assigns higher weight to farther neighbors
  4. It has no impact on the algorithm

Correct answer

B. It assigns higher weight to closer neighbors

17 views

MCQSEXAM

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

Shown after review. No links please.

More K-Nearest Neighbors (KNN) MCQs

Practise all K-Nearest Neighbors (KNN) MCQs

Similar MCQs