◑ applying · kind algorithm · level 3 · 10h
- Implementa: Supervised Learning
Classifies by majority vote of the closest training points — no training, all inference. A useful baseline and a lens on the curse of dimensionality.
In Statistics and machine learning, the k-nearest neighbors algorithm (k-NN) is a non-parametric Supervised Learning method that assigns weightage only to the k nearest neighbors of an entity in making a decision about the entity. It is used both in classification — where a new example is assigned a label based on the labels of its k nearest training examples; and in regression — where the prediction is computed from the values of those neighbors. Its more frequent use is for classification, as the k-NN classifier, the output of which is a class membership decided by a plurality vote of its neighbors.
Enlaces
- Implementa: Supervised Learning