What is the purpose of the 'k' in k-Nearest Neighbors (kNN) algorithm?

  • It indicates the number of features in the dataset
  • It is the dimensionality of the input space
  • It represents the number of clusters in the dataset
  • It signifies the number of nearest neighbors to consider
The 'k' in k-Nearest Neighbors refers to the number of nearest neighbors to consider when making predictions. A higher 'k' leads to a smoother decision boundary, while a lower 'k' makes the algorithm more sensitive to local patterns.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *