1nn
1NN, short for 1-nearest neighbor, is one of the simplest supervised learning algorithms. It can be used for both classification and regression. In classification tasks, the predicted label of a new instance is the label of the closest instance in the training data, according to a chosen distance metric. In regression, the predicted value is the value of the closest training instance.
Training and prediction: There is essentially no training phase beyond storing the dataset; the algorithm is
Properties and limitations: Pros include simplicity, no explicit training phase, and easy interpretation. Cons include sensitivity
Variants and efficiency: Weighted 1NN assigns greater influence to closer neighbors, though with k=1 it reduces
Applications and history: 1NN is a foundational baseline in pattern recognition and machine learning. It is