---
title: "K-NN advantages and disadvantages"
subject: "Data Mining"
chapter: 3
key: "semester_7/data_mining:knn-pros-cons"
source: https://www.bctengineer.com/q/semester_7/data_mining/knn-pros-cons
site: BCT Engineering
---

# K-NN advantages and disadvantages

Data Mining · Chapter 3: Classification

- Asked in: year not given
- Video: [What is the K-Nearest Neighbor (KNN) Algorithm?](https://www.youtube.com/watch?v=b6uHw7QW_n4) — IBM Technology
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/knn-pros-cons
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-3

## Question

What are the advantages and disadvantages of Nearest Neighbor Classifier?

## 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.

## Answer

#### 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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why does KNN have no training phase?
   A. It builds a tree at query time only
   B. It just stores data and builds no model
   C. It uses precomputed weights
   D. It trains on one record
   Answer: B. KNN is lazy and instance-based. (Key point: Lazy learner)

2. Why is KNN classification slow?
   A. Distance to every stored record is computed for each query
   B. It must retrain per query
   C. It uses backpropagation
   D. It rebuilds the k-d tree
   Answer: A. Cost is O(n.d) per query and all data must be stored. (Key point: Slow classification)

3. Why must attributes be normalised for KNN?
   A. Because K must be odd
   B. To remove noise
   C. Large-scale attributes would dominate the distance
   D. To make the model eager
   Answer: C. Distance is affected by attribute scale. (Key point: Scale sensitivity)

4. What does the curse of dimensionality do to KNN?
   A. Makes the model faster
   B. Reduces memory use
   C. Makes K irrelevant
   D. Distances lose meaning in high dimensions
   Answer: D. Neighbours become hard to distinguish, hurting accuracy. (Key point: High dimension)

## Related in Data Mining

- [Rote-learner and K-nearest neighbor](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Arote-learner-knn) — Data Mining, chapter 3
- [K-nearest neighbor on student table](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aknn-student-weights) — Data Mining, chapter 3
