Hierarchical clustering
What it is
Builds a tree of merges (or splits); cut the dendrogram anywhere to get a chosen number of clusters.
When to use it
When the cluster count is unknown, when you want a hierarchy, or when n is small enough for a distance matrix.
Caveats
Standard agglomerative algorithms need quadratic memory and at least quadratic time, so they do not scale to large datasets. Merges are greedy and never undone, and the result depends strongly on the linkage rule (single linkage chains; complete and Ward favour compact clusters).
Key ideas
- Builds a full tree (dendrogram) of nested clusters instead of one flat partition
- The number of clusters is chosen afterwards by cutting the tree
- The linkage rule (single, complete, average, Ward) defines the distance between clusters
Related architectures
Original paper
Hierarchical Grouping to Optimize an Objective Function (1963, DOI)