All labs

Cluster Geometry: k-means, DBSCAN, and Shapes That Break Them

Compare centroid and density clustering on blobs, moons, and pure noise — and see why the elbow plot cannot tell you k.

Ch 8 8.4
Comparator
Unsupervised Learning & Text
22 mindifficulty 3/5

Controls

Data geometry
Algorithm
2

k-means will always return exactly this many clusters.

0.140
400
Random seed

Every result on this page is a deterministic function of the seed and the controls.

Cluster assignment

Crosses mark centroids; boundaries are implicitly straight lines.

-2-1012-2-1012x₁x₂
Cluster 1Cluster 2

Elbow curve

Within-cluster sum of squares always falls with k.

010020030040012345678kinertia

Monotone decrease is guaranteed, so a low inertia never validates a choice of k.

Clusters found
2
Labelled noise
0
DBSCAN only
Silhouette
0.500
assumes compact, convex clusters
Adjusted Rand index
0.346
agreement with the generative labels