Skip to main content

K-NN advantages and disadvantages

Short answer

Nearest neighbor classifier is simple, requires no training, and models complex boundaries. However, it is slow, sensitive to scaling and irrelevant attributes, suffers from curse of dimensionality, and is affected by noise and imbalance.

What are the advantages and disadvantages of Nearest Neighbor Classifier?

Advantages

  • Simple to understand and implement.
  • No training phase: it is a lazy learner and just stores the data, so new data can be added easily.
  • Can model complex, non-linear decision boundaries, since it uses local information; works with multi-class problems.
  • Gives good accuracy when there is enough representative data; also usable for regression (average of neighbours).
  • Only two things to choose, K and the distance measure.

Disadvantages

  • Slow classification: the distance to every training record is computed for each query (cost O(n·d)); needs a lot of memory to store all the data.
  • Sensitive to the scale of attributes; requires normalisation.
  • Affected by irrelevant attributes and by the curse of dimensionality, since distances lose meaning in high dimensions.
  • Sensitive to noise and outliers if K is small; and to imbalanced classes, since the majority class dominates the vote.
  • Choice of K and the distance measure affects results.
  • Gives no explanation or model; poor for categorical attributes unless a suitable distance is defined.

Speed can be improved by indexing (k-d trees), condensing or editing the training set, and dimensionality reduction.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Data Mining chapter 3 questions →