Hierarchical clustering builds a tree of nested clusters by repeatedly merging the two closest clusters (agglomerative) or splitting the largest cluster (divisive). The dendrogram encodes the entire merge history - the height of each merge represents the distance at which two clusters were joined. Cutting the dendrogram horizontally at any height gives you a flat clustering with a chosen number of groups.
Watch the merge process step by step: the two closest clusters highlighted and combined, the dendrogram growing upward
Compare Ward, complete, single, and average linkage - see how the choice dramatically changes cluster shape and cohesion
Cut the dendrogram at different heights and see the corresponding flat clustering color-coded on the scatter plot
Understand why Ward linkage minimizes total within-cluster variance - it produces compact, roughly equal-sized clusters
Learn the key advantage over k-means: no need to specify k upfront - the dendrogram reveals natural cluster structure
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.