A step-by-step walkthrough of K-Means clustering in two dimensions. You choose how to project the data — or let the algorithm show you what it sees.
Each monster is described by six features. Before running the algorithm, understand what each feature measures and how color encodes warmth.
Warmth is read from the color wheel. Blue = 0 (coolest). Orange = 6 (warmest). Moving in either direction from blue adds 1 — so red and yellow monsters can both score 4, because both are 4 steps from blue on opposite sides of the wheel.
| Feature | What it measures | Range |
|---|---|---|
| Warmth | Color temperature — distance from blue on the color wheel | 0 – 6 |
| Eyes | Number of eyes | 1 – 4 |
| Feet | Number of feet | 0 – 4 |
| Teeth | Number of visible teeth | 0 – 4 |
| Solid | Body is a solid color — no markings or patterns | 0 or 1 |
| Wings | Has wings or wing-like appendages | 0 or 1 |
Each monster has six features, but a plot needs exactly two dimensions. We combine those six numbers into two — one for the horizontal axis and one for the vertical — by multiplying each feature by a coefficient and adding the results up.
Before multiplying by any coefficient, each feature value is centered — shifted so that the average of that feature across all 20 monsters becomes zero. This is not an arbitrary adjustment: the average is a real property of this specific training dataset, not the theoretical midpoint of the possible range.
Notice that the mean of Warmth is 2.50 — not 3.0. These 20 monsters lean slightly cool. A different training set would produce different means, a different center, and different coordinates for everything.
Look for natural groupings before placing your starting centroids in the next step.
Drag each ★ star to where you think a cluster center might be. This is your best guess — the algorithm will refine the positions from here. Stars snap to the nearest 0.5 unit.