Clustering
Grouping similar things together with no labels at all
- Clustering groups similar things together with no bins decided in advance. It starts from data with no labels at all.
- Naming a group is something a person does after the groups form. The model only ever says "these look alike."
- The result depends entirely on what counts as "alike." Group by thickness and you get one split; group by color and you get a different one.
- How many groups to make usually has to be decided by a person up front, too. Change that number and the result changes.
- There's no right answer, so you can't grade it as correct or wrong. Whether it's useful is a call a person makes by looking at the result.
Contents
1The analogy
A pile of clothes sits in the closet of a new apartment. Nothing has been decided yet about what goes where, and none of the clothes carry labels. Even so, sorting can start: heavy clothes drift toward heavy clothes, light ones toward light ones, hands doing it almost on their own. Clustering is grouping like this, without deciding the bins first.
Names only get attached after the piles have formed. You look at one pile and call it "winter clothes" — that comes after, not before some winter-clothes bin got set up and filled.
What you use as the standard changes the piles completely, which is the interesting part. Sort by thickness, and you get winter and summer clothes. Sort by color, and you get dark and light. Same closet, completely different result.
2In detail
The bins show up afterward
Classification and clustering both look like "sorting," which makes them easy to mix up. What splits them apart is when the bins appear. Classification has a bin list first — New York-bound, Chicago-bound — and puts each item into one of them. Clustering has no bin list. You group things and only then find you've got piles.
That changes the raw material too. Classification needs plenty of correctly labeled examples; clustering needs none at all. Most of the world's data sits around unlabeled, which is why clustering is often the first thing people reach for when labeling everything would be too much work.
What a model hands back isn't a name either — it's a number. Group 1, group 2. Whether group 1 is winter clothes or workout gear is something a person decides by looking inside.
You have to define "alike"
Half of clustering is deciding what counts as alike. Judge clothes by thickness, color, or fabric, and you get completely different piles each time. Without setting a standard, you can't even get started.
In practice, each item gets turned into a bundle of numbers, and the distance between those bundles gets measured. For clothes, thickness, sleeve length, and how bright the color is might become the numbers. What gets included and left out decides the result.
Mixing scales that don't match takes special care. If one number ranges 0 to 1 and another ranges 0 to 1000, the second one ends up dominating the distance entirely, so the scales usually get lined up first.
How many groups to make
A question that comes up constantly in clustering is how many groups to end up with. Most popular methods need a person to set that number before they'll even run. Say two, and you get two groups; say six, and you get six.
For the closet, that's like deciding whether to use two drawers or six. Two drawers gives a clean split between heavy and light clothes; six drawers splits it further by season and use. Neither is more correct — it depends on what you actually need.
There are methods that help pick the number, too: running it with more and more groups, watching how tight each group gets, and stopping once adding more stops helping much. Even then, the final call usually comes down to a person looking at the result.
3More precisely
Clustering learns structure straight from the data with no labels attached, which is why it falls under unsupervised learning. The most widely used approach fixes the number of groups up front, picks a center for each one, assigns each data point to its nearest center, then moves the centers and repeats. Other approaches treat dense regions as groups and leave sparse points ungrouped, or merge the closest items step by step into a tree shape. Which method you use changes the shape and count of the groups, and how it handles items that don't fit anywhere.
The analogy breaks down in places. A closet puts each item in exactly one drawer, but clustering can let a single item belong partly to more than one group. Groups aren't always cleanly separated either — real data often flows continuously from one cluster into the next, so wherever you draw the line feels a little arbitrary. And a person's hands know what "winter clothes" means while sorting; clustering never knows meaning at all, it only measures distance between numbers, however sensible the resulting piles look from the outside.
4Try it yourself
5Common misconceptions
It's easy to think clustering is just an easier version of classification, but actually it starts from a different problem with no bins at all, and there's no correct answer to grade it against.
It's easy to think the model names the groups for you, but actually it only hands back numbers, and a person has to look inside and decide what each group actually is.
It's easy to assume feeding in data gets you a good grouping automatically, but actually the result depends entirely on how you define "alike" and how many groups you ask for.
7One-line summary
In shortClustering gathers unlabeled data into piles of things that look alike, and what each pile actually is only gets named by a person, after the fact.
Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02