Machine learningMachine learningAlgorithm

Hierarchical Clustering

Also known as: Hiyerarşik Kümeleme, hiyerarşik kümeleme, agglomerative clustering, hierarchical agglomerative clustering, HAC

OriginatorWard, J. H.Year1963Sources1Related methods23

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.

Key highlights

  • 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.

Intuition

This section is available to Pro members. Upgrade to Pro

How it works

This section is available to Pro members. Upgrade to Pro

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

Strengths
  • 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.
Limitations
  • 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.

Common pitfalls

This section is available to Pro members. Upgrade to Pro

Applications

This section is available to Pro members. Upgrade to Pro

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

  1. 1.
    Ward, J. H. (1963). Hierarchical Grouping to Optimize an Objective Function. Journal of the American Statistical Association, 58(301), 236–244.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 1). Hierarchical Clustering. ScholarGate. https://scholargate.app/machine-learning/hierarchical-clustering