← All models
algorithm

K-Nearest Neighbors

beginnersupervised
non parametricclassificationregressiontabular

KNN predicts from the labels of the most similar stored examples.

Mechanisms

nearest neighborsdistance

Properties

local methodnonlinear

Constraints

poor extrapolationrequires scalingsensitive to high dimensionslow inference

Practical profile

Explainability
medium
Training cost
low
Inference cost
high
Data appetite
medium