Overview
The nearest neighbor algorithm is design to infer the classification of a datapoint by examing the points near it in the dataset. In particular, it finds the {% k %} number of points most similar to the point in question by using a metric function. Then it infers the points classification by taking the classification that is assigned to the most points in the {% k %} neighbors.
The nearest neighbor algorithm can also be used to estimate numeric values as well, but taking the average of the values of the {% k %} nearest neighbors.
Algorithms
- Implementation - interpolates the value of a given point from the values of k points nearest it in the dataset
- Kernel Density - Extending the method a little further, we get a technique called kernel density estimation (or previously, parzen windows).