Skip to content
Back to course

9.3 Hierarchical Clustering

Hierarchical clustering builds a tree (called a dendrogram) of nested groups. The common 'agglomerative' approach starts with every point as its own cluster, then repeatedly merges the two closest clusters until everything is joined into one. You can then 'cut' the tree at any level to get the number of clusters you want.

Nearby points merge step by step into ever-larger nested clusters.

Picture a family tree of villages in a region: nearby villages merge into a woreda, woredas merge into a zone, and zones into a region. Hierarchical clustering produces exactly this kind of nested structure, letting you choose how fine or coarse you want the grouping.

Scenario

You have a small dataset and you're unsure how many clusters exist. Which method lets you decide the number after seeing the structure?

Check your understanding

1/4 · 40 XP

What visual output is associated with hierarchical clustering?