To classify a point, find the k closest training points by a distance metric (usually Euclidean) and take a majority vote (or average for regression).
There is no training step (a lazy learner), so prediction is slow on large datasets.
It needs feature scaling and suffers in high dimensions (curse of dimensionality).
Small k gives high variance; large k gives high bias. Choose k with cross-validation.
Loading…