Learn Before
Concept

1-Nearest Neighbor Algorithm

The 11-nearest neighbor algorithm is the simplest case of the kk-nearest neighbor approach, where k=1k=1. At training time, the learner memorizes the dataset, and at prediction time, it assigns a new data point the label of its single closest neighbor based on a chosen distance function dd. Because it memorizes the data, the algorithm always achieves a training error of zero by perfectly interpolating the training data. Despite this, it can still generalize; under mild conditions, the 11-nearest neighbor algorithm is a consistent estimator, meaning it eventually converges to the optimal predictor.

0

1

Updated 2026-05-06

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L