Hierarchical Clustering
Hierarchical Agglomerative Clustering · Also known as: Hiyerarşik Kümeleme, hiyerarşik kümeleme, agglomerative clustering, hierarchical agglomerative clustering, HAC
Hierarchical clustering is an unsupervised method that groups observations into nested clusters and draws the result as a dendrogram, so the number of clusters need not be fixed in advance. Its agglomerative form rests on the objective-function grouping criterion introduced by Joe Ward in 1963.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
+10 more
When to use it
Use it for exploratory grouping when you want to discover structure without pre-specifying the number of clusters, on continuous, ordinal, or categorical features with at least about 10 observations. It is assumption-light but hinges on two choices: a suitable distance metric and a suitable linkage method. Below about 10 observations the distance matrix is unreliable and the dendrogram cannot show meaningful structure, so K-means is a safer alternative; on very small samples results become overly sensitive to the linkage method and cluster memberships are unstable.
Strengths & limitations
- Does not require the number of clusters to be fixed in advance — you read it off the dendrogram.
- The dendrogram gives an interpretable visual map of how clusters nest at different similarity levels.
- Assumption-light: no normality requirement, and it accommodates continuous, ordinal, and categorical features through the distance choice.
- Works as an exploratory tool to reveal structure before committing to a partition.
- Results depend heavily on the chosen distance metric and linkage method, which are user decisions.
- On small samples cluster memberships are unstable and overly sensitive to the linkage method.
- With fewer than about 10 observations the distance matrix is unreliable and the dendrogram shows no meaningful structure.
Frequently asked
Do I need to choose the number of clusters first?
No. Hierarchical clustering builds the full merge tree regardless, and you decide the number of clusters afterward by cutting the dendrogram at a chosen height — that is one of its main advantages over methods like K-means.
Which distance metric and linkage should I use?
Both are deliberate choices that strongly shape the result. The distance metric should match your feature types, and Ward's linkage is a common default because it keeps clusters compact by minimising the increase in within-cluster variance at each merge.
How many observations do I need?
At least about 10. Below that the distance matrix is unreliable and the dendrogram cannot reveal meaningful structure, so K-means is the safer alternative.
Why are my clusters unstable?
On small samples the result is overly sensitive to the linkage method, so cluster memberships shift with small changes. In that situation consider K-means or a Gaussian mixture model instead.
Sources
- Ward, J. H. (1963). Hierarchical Grouping to Optimize an Objective Function. Journal of the American Statistical Association, 58(301), 236–244. DOI: 10.1080/01621459.1963.10500845 ↗
How to cite this page
ScholarGate. (2026, June 1). Hierarchical Agglomerative Clustering. ScholarGate. https://scholargate.app/en/machine-learning/hierarchical-clustering
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- DBSCANMachine learning↔ compare
- Factor AnalysisResearch Statistics↔ compare
- Gaussian Mixture ModelMachine learning↔ compare
- Principal Component AnalysisMachine learning↔ compare