---
title: "K-means strengths and weaknesses"
subject: "Data Mining"
chapter: 5
key: "semester_7/data_mining:kmeans-strengths-weaknesses"
source: https://www.bctengineer.com/q/semester_7/data_mining/kmeans-strengths-weaknesses
site: BCT Engineering
---

# K-means strengths and weaknesses

Data Mining · Chapter 5: Cluster Analysis

- Asked in: year not given
- Video: [KMeans Clustering Algorithm | Steps in KMeans Algorithm | Advantages Disadvantages by Mahesh Huddar](https://www.youtube.com/watch?v=3tLdD-4-wnI) — Mahesh Huddar
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/kmeans-strengths-weaknesses
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-5

## Question

Describe K-means algorithm for clustering and discuss its strengths and weaknesses.

## Short answer

K-means partitions data into k clusters by repeatedly assigning points to the nearest centroid and updating means until convergence. Strengths: simple, efficient O(nkt), scalable, works well on globular clusters. Weaknesses: k must be given, sensitive to initialization and outliers, only numeric data, cannot find non-convex shapes.

## Answer

#### K-means algorithm
K-means partitions n objects into k clusters where each object belongs to the cluster with the nearest mean (centroid).

```text
1. Choose k and select k initial centroids (random objects).
2. Repeat
   a. Assign each object to the nearest centroid
      (Euclidean distance) -> k clusters.
   b. Recompute each centroid as the mean of its cluster.
3. Until no object changes cluster (centroids stable).
```

It minimises SSE = Σᵢ Σ_{x∈Cᵢ} d(x, cᵢ)². *Example*: points 1, 2, 9, 10 and k = 2 with initial centroids 1 and 2 give {1, 2} and {9, 10} with centroids 1.5 and 9.5.

#### Strengths
- **Simple** and easy to implement and understand.
- **Efficient and scalable**: complexity O(n·k·t), where t (iterations) and k are much less than n.
- Usually **converges quickly**; good for large data sets.
- Produces tight, compact clusters when clusters are globular, and gives clear cluster centres.
- Easy to adapt (k-medoids, k-modes, bisecting k-means).

#### Weaknesses
- The number of clusters **k must be specified** in advance.
- Result depends on the **initial centroids** and often ends in a local optimum; it must be rerun several times.
- **Sensitive to noise and outliers** since the mean is affected by extreme values.
- Applicable only when the **mean** is defined (numeric data); categorical data needs k-modes.
- Cannot find **non-convex or arbitrarily shaped** clusters, nor clusters of very different sizes or densities.
- Distances lose meaning in **high dimensions**; empty clusters may occur.

## Check yourself

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

1. What does K-means minimise?
   A. Number of clusters
   B. Sum of squared distances of objects to their cluster centroids (SSE)
   C. Maximum distance between clusters
   D. Number of iterations
   Answer: B. K-means minimises SSE = sum over clusters of squared distances from objects to the centroid. (Key point: K-means objective)

2. Why is K-means efficient for large data sets?
   A. Its complexity is O(n*k*t), linear in n
   B. It needs O(n^2) distance computation
   C. It always converges to the global optimum
   D. It uses no distance calculations
   Answer: A. Cost O(nkt) with k and t much smaller than n makes it scalable. (Key point: Efficiency)

3. Why is K-means sensitive to outliers?
   A. It ignores extreme values
   B. The centroid is a mean, which is pulled by extreme values
   C. It uses medoids
   D. It requires labelled data
   Answer: B. The mean is affected by extreme values, so outliers shift centroids and distort clusters. (Key point: Outlier sensitivity)

4. What problem arises from the choice of initial centroids?
   A. The result may end in a local optimum, so it is rerun several times
   B. K-means cannot start without class labels
   C. It makes all clusters identical
   D. It removes noise automatically
   Answer: A. Results depend on initial centroids and often stop at a local optimum, hence multiple runs. (Key point: Initial centroids)

## Related in Data Mining

- [Need of clustering; hierarchical vs partitioning; K-means](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Acluster-need-hier-vs-partition-kmeans) — Data Mining, chapter 5
- [Short note: K-means clustering](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Akmeans-note) — Data Mining, chapter 5
- [Likelihood and distance; K-means drawbacks](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Alikelihood-distance-clustering-kmeans-drawbacks) — Data Mining, chapter 3
- [Cluster analysis; K-means on height/width](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Akmeans-height-width) — Data Mining, chapter 5
- [K-means on six 2-D instances (K=2)](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Akmeans-x-y-k2) — Data Mining, chapter 5
- [Cluster analysis applications; K-means](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Acluster-application-kmeans) — Data Mining, chapter 5

## Related in other subjects

- [Quadratic probing vs clustering](https://www.bctengineer.com/question.md?key=semester_4%2Fdata_structure_and_algorithm%3Aquadratic-probing-clustering) — Data Structure and Algorithm, chapter 8
