Skip to content

Glossary: Unsupervised Learning

nearest neighbors

Also written: NearestNeighbors, kneighbors

The rows closest to a given row. In scikit-learn, `NearestNeighbors` and its `kneighbors` method return the distances and positions of the closest rows, starting with the row itself, which can be used to find lookalike customers.

Where the book teaches it

Related terms

Euclidean distancek-distance plot