K-means clustering
The k-means algorithm from start to finish: choosing k, initialising, assigning, recomputing, stopping; inertia, the elbow, and sensitivity to initialisation, scales and cluster shape.
- 23 cards
- 6 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- The curves
- Scenarios
- Understand
A few cards from the deck
Unsupervised learning: what is it?
Show the answer
Learning that looks for structure in data that has no label and no target value to predict.
There is no correct answer to compare with: groups or patterns are judged by their usefulness and coherence.
What is the within-cluster inertia when k equals the number of points?
- 0: each point is its own centre
- The largest possible value, since each group is tiny
- The dataset's total variance, as for k = 1
- 1, the reference value of a partition into singletons
Show the answer
0: each point is its own centre
Each point coincides with its centre: every distance to the centre is zero. This is why inertia cannot choose k on its own, and why we read the elbow of its curve.
Before running k-means, you must set …: the algorithm does not guess it.
Show the answer
Before running k-means, you must set the number of groups: the algorithm does not guess it.
Choosing k is a human decision, helped by the elbow method. A k that is too small merges groups, one that is too large splits them.
Clustering: what is it?
Show the answer
Splitting individuals into groups such that those in the same group resemble one another more than they resemble those of the other groups.
Everything depends on the similarity measure (distance) and the variables chosen: the same dataset can be grouped in several valid ways.