The k-nearest neighbors algorithm and local solutions

The k-nearest neighbors (k-NN) algorithm is one of the most intuitive yet fundamental machine learning algorithms. It makes almost no assumptions about the data, does not train a parametric model, but instead stores the training examples and relies on a simple, almost geometric idea: similar objects should have similar answers.