What is the difference between agglomerative and divisive hierarchical clustering?
Last updated
Both build a hierarchy (dendrogram) of nested clusters but in opposite directions: agglomerative is bottom-up (start with singletons, repeatedly merge the closest pair), divisive is top-down (start with one cluster, repeatedly split).
Agglomerative (AGNES):
Each step merges the two clusters with the smallest linkage distance: single, complete, average, or Ward.
Cost: naive O(n³), O(n²) time/memory with efficient implementations (SLINK, nearest-neighbor chain) and a distance matrix.
Decisions are local and greedy; early merges can't be undone.
By far the most common in practice (
sklearn.cluster.AgglomerativeClustering,scipy.cluster.hierarchy.linkage).
Divisive (DIANA):
Each step splits one cluster into two (e.g. DIANA's splinter group, or bisecting K-Means).
Exhaustive optimal splitting is exponential (2^(n−1) bipartitions), so heuristics are required.
Sees global structure first, so top-level splits can be more accurate; you can stop early if only a few clusters are needed.
Choosing between them:
Need fine-grained structure or a full dendrogram on moderate n: agglomerative.
Care about the few top-level groups, or large n with bisecting K-Means: divisive.
Either way, cut the dendrogram at a height or cluster count to get a flat clustering.