wiki.neuro.tu-berlin.de

k-NN

k-Nearest Neighbors(k-NN)

The k-nearest neighbors algorithm is a non-parametric, supervised learning classifier, which uses 'feature similarity' to predict the values of any new data points. In a sentence, given a set of already labeled points, a positive integer k, and a distance measure d(e.g., Euclidean, Hamming, etc), for a new input point p, k-NN labels p as the most present class among its k neighbors that are in the labeled set.

k-NN
Figure 1 : Visual presentation of simulated working example. Class 1,2 and 3 are denoted by red, green, and blue colors, respectively. Dots represent test data and triangles are training data. k=6. [1]

Pros and Cons

Advantages

Challenges

Application Scenario

References


  1. Zhang, Z. (2016). Introduction to machine learning: k-nearest neighbors. Annals of Translational Medicine, 4(11), 218–218. doi:10.21037/atm.2016.03.37 ↩︎

  2. https://www.ibm.com/topics/knn ↩︎