The big idea: Clustering groups records that resemble each other, with no labels and no idea in advance of what the groups should be.
The groups are the output, not the input. That is what makes it unsupervised.
| Classification | Clustering | |
|---|---|---|
| Learning | Supervised | Unsupervised |
| Needs | Labelled examples | No labels at all |
| Groups are | Known in advance | Discovered |
| Question | Which known category is this? | What groups exist here? |
| Evaluated by | Comparing with the true answer | Judgement — there is no true answer |
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
Choose k and place centres
Assign
Move the centres
Repeat until stable
The starting positions change the answer: Different random starts can give different final clusters from the same data. k-means finds a local optimum, not the best possible grouping.
Standard practice is to run it several times and keep the best — which is an admission that one run cannot be trusted.
Memorize terms 3x faster
Smart flashcards show you cards right before you forget them. Perfect for definitions and key concepts.
Deciding how many clusters
- The elbow method — plot total within-cluster distance against k and look for where it stops falling sharply
- Beyond that point, extra clusters split groups that were already coherent
- Domain knowledge often beats the plot: a shop may want four segments because it can run four campaigns
- k = n gives a perfect score and no information, which shows the measure alone cannot choose
The clusters have no names: The algorithm returns "cluster 0, 1, 2". Deciding that cluster 1 is "price-sensitive weekly shoppers" is a human interpretation of the records inside it.
That interpretation can be wrong, and nothing in the output will say so.
Scale the features first: k-means uses distance, so a feature measured in thousands dominates one measured in units. Income in pounds against number of children will cluster almost entirely on income.
Normalising first is not a detail — without it the result is decided by whichever column happens to have big numbers.
How this is tested — you must identify a task as unsupervised, trace k-means, and be honest about what the output does not tell you. It comes up two ways:
Paper 1 Section A
- Describe how clustering groups data, 3-4 marks
- Identify a task as supervised or unsupervised
- State one step of k-means
Paper 1 Section B — case study
- Justify clustering for a scenario
- Explain a limitation of the result
The classic trap: Saying the algorithm "finds customer types". It finds groups of similar records. Calling one of them a customer type is a human reading, and it can be wrong.
A supermarket wants to group customers by shopping habits without deciding the groups in advance. Describe how k-means would do this and state two limitations.
Model answer plan
See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.