Skip to content

Unsupervised Learning

Hierarchical Clustering

7 min+65 XPStep 1/10

Clustering without picking k

Agglomerative clustering starts with every point as its own cluster, then repeatedly merges the two closest clusters until only one remains.

The full merge history is recorded in a dendrogram — a family tree of your data. Cut the tree horizontally at any height and you get a different number of clusters: every k explored in a single run.

insight

K-means makes you guess k and pray. A dendrogram shows you the structure at every granularity first — then you decide where to cut.