Machine Learning

Clustering

Grouping things that resemble each other — and the fact that the algorithm always returns groups, whether or not any exist.

Reviewed July 10, 2026Stable
Reading level: Curious
Pick your depth ↓

When not to use it

  • When you already know the categories. That's classification, and it's more accurate and measurable.
  • On high-dimensional data without reduction. Distances concentrate and "similar" stops meaning anything.
  • To justify a decision on its own. A cluster is a hypothesis. Someone has to look at it and vouch for it.

Reach for something else instead

  • Classification when the groups are known and you have labels.
  • Manual segmentation on business rules — often the right answer, and it has the advantage of being explicable.
  • Dimensionality reduction plus looking — sometimes you just want to see the shape of the data, not commit to groups.

Clustering groups points by closeness, with no labels given.

Unsupervised by definition, clustering finds structure in unlabeled data by grouping points that are near each other. Nobody tells it what the groups mean — it discovers that similar things belong together. The catch is that 'similar' depends entirely on your distance measure and the number of clusters you ask for, both of which quietly shape what it finds.

Further reading

  • Arthur & Vassilvitskii (2007), k-means++: The Advantages of Careful Seeding — why initialisation matters, and the fix.
  • Ester et al. (1996), A Density-Based Algorithm for Discovering Clusters — DBSCAN, and clusters that aren't blobs.
  • von Luxburg, Williamson & Guyon (2012), Clustering: Science or Art? — the stability and evaluation problem.

Primary sources, listed so you can check the claims on this page rather than take them on trust.

Where people go wrong

  • Trusting k from the elbow method. It's a hint. The right k is the one a domain expert can name.
  • Running k-means once. It converges to local optima; different seeds give different answers, and that variation is information.
  • Clustering unscaled data, then discovering the groups are entirely about revenue because revenue had the biggest numbers.

At a glance

FieldMachine Learning
Core ideagroup by similarity
Defaultk-means, with spherical assumptions
Better for odd shapesDBSCAN
Always returnsgroups, real or not
DifficultyBeginner → Intermediate
Flashcards for this concept · study, save or share them →
Question
Answer
1 / 4

Often compared with

k-means vs. DBSCAN — forcing every point into a round group vs. finding dense regions and calling the rest noise.

Where this sits

2 concepts come first. Understanding it opens up 1 more.

2Levelsteps in
2Needs firstconcepts
1Opens up0% of 310
1Areastays here
Learn these firstUnsupervised Learning
LEARN FIRST UnsupervisedLearning Clustering HierarchicalClustering UNLOCKS
Clustering sits after Unsupervised Learning, and leads to 1 concept.

Computed from the prerequisite graph, not assigned. How this works