MPE StudioMath of Planet Earth
Machine Learning Toolkit · 04

Determining the Number of Clusters

Using loss reduction without over-partitioning

Increasing k always lowers k-means loss, so the smallest loss alone cannot choose the model. The elbow method looks for the point where extra clusters yield diminishing returns.

watchone idea
→
manipulateone example
→
leave withone intuition

The essential idea: choose k near the bend in the loss curve, not at its absolute minimum.

Watch the concept

One Concept · One Example

Determining the Number of Clusters video thumbnail▶

Determining the Number of Clusters

Presented by Charlotte Moser

Watch on YouTube ↗

What to notice

The idea in 30 seconds

Trade fit against complexity

K-means loss

The objective sums squared distances from every point to its assigned centroid.

L=∑in‖xi−μci‖2

Elbow criterion

Look for a sharp change in the rate at which loss decreases.

k=k*:ΔL begins to flatten
Explore

Where is the elbow?

Move across candidate values of k and compare the selected partition with its loss curve.

×××
KEY TAKEAWAY

The elbow method chooses a parsimonious number of clusters where additional complexity buys little improvement.