Model Building & Algorithm Learning

Clustering Playground

Compare centroid, density and hierarchical clustering while watching the clusters form step by step.

Lab concept guide

What to observe while you experiment

Clustering algorithms define “group” in different ways: K-Means prefers compact centroid-based groups, DBSCAN uses dense neighbourhood connectivity, and hierarchical methods merge or split according to a linkage rule. There is no target label telling the algorithm the correct grouping.

MechanismKeep the dataset fixed while changing the clustering algorithm or one structural hyperparameter, then inspect how point assignments are formed.
Failure modeTreating cluster IDs as ground-truth categories or comparing algorithms without considering scale, distance and cluster shape.
VerificationCheck assignments against the algorithm’s mechanism: centroid distance for K-Means, neighbourhood density for DBSCAN, or linkage distances for hierarchy.
Experiment deliberately
Use moons or outlier-rich blobs. Predict which method should struggle and explain the failure in terms of its definition of a cluster.
Ready.

Cluster geometry

Colours are discovered labels, not ground-truth classes.

Algorithm state

K-Means alternates assignment/update; hierarchical clustering merges the closest clusters; DBSCAN expands density-connected regions.