---
title: "Short note: Hierarchical clustering"
subject: "Data Mining"
chapter: 5
key: "semester_7/data_mining:hierarchical-clustering-note"
source: https://www.bctengineer.com/q/semester_7/data_mining/hierarchical-clustering-note
site: BCT Engineering
---

# Short note: Hierarchical clustering

Data Mining · Chapter 5: Cluster Analysis

- Asked in: year not given
- Video: [#25 Hierarchical Clustering - Agglomerative & Divisive Algorithm |DM|](https://www.youtube.com/watch?v=wl2_3DVOfKc) — Trouble- Free
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/data_mining/hierarchical-clustering-note
- Whole chapter: https://www.bctengineer.com/md/semester_7/data_mining/chapter-5

## Question

Write a short note on Hierarchical Clustering.

## Short answer

Hierarchical clustering builds a dendrogram of nested clusters via agglomerative (bottom-up merging) or divisive (top-down splitting) approaches using linkage criteria like single, complete, or average link. It needs no predefined k, gives a deterministic hierarchy, but cannot undo merges, is sensitive to noise, and has O(n²) complexity.

## Answer

**Hierarchical clustering** builds a hierarchy (tree) of nested clusters instead of a single partition. The result is displayed as a **dendrogram**, a tree whose leaves are individual objects and whose height shows the distance at which clusters merge. Any number of clusters can be obtained by cutting the dendrogram horizontally at a chosen level.

#### Types
1. **Agglomerative (AGNES, bottom-up)**: start with every object as a separate cluster and repeatedly merge the two closest clusters until one cluster remains.
2. **Divisive (DIANA, top-down)**: start with one cluster of all objects and repeatedly split the most heterogeneous cluster.

#### Distance between clusters (linkage)
- **Single link** = smallest distance between members of the two clusters (can form chains).
- **Complete link** = largest distance (compact clusters).
- **Average link** = mean of all pairwise distances.
- **Centroid / Ward's** methods.

```text
 distance
   |        ___________
   |      _|__       _|_
   |     |    |     |   |
   +-----a----b-----c---d----  dendrogram
```

#### Features
- No need to give k in advance; gives a rich view of the data structure.
- Deterministic result (no random starts).
- **Cannot undo** a merge or split; sensitive to noise and outliers.
- Time complexity at least O(n²), memory O(n²) for the distance matrix; not good for very large data. 
- Improved by BIRCH, CURE and Chameleon.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does the height in a dendrogram show?
   A. The number of objects
   B. The distance at which clusters merge
   C. The cluster centroid
   D. The number of iterations
   Answer: B. Leaves are objects and the height shows the distance at which clusters are merged. (Key point: Dendrogram)

2. Which linkage can form chains and which gives compact clusters?
   A. Complete link chains; single link compact
   B. Single link can chain; complete link gives compact clusters
   C. Both chain
   D. Neither is affected
   Answer: B. Single link uses minimum distance and can chain; complete link uses maximum distance and gives compact clusters. (Key point: Single vs complete link)

3. Which is a limitation of hierarchical clustering?
   A. Random starts give different results
   B. A merge or split cannot be undone, and cost is at least O(n^2)
   C. k must be given in advance
   D. It cannot show structure
   Answer: B. Steps are final and the distance matrix makes cost and memory O(n^2), unsuited to huge data. (Key point: Limitations)

4. What does divisive clustering (DIANA) do?
   A. Starts with every object separate and merges
   B. Starts with one cluster of all objects and repeatedly splits the most heterogeneous cluster
   C. Chooses k medoids
   D. Uses grid cells
   Answer: B. DIANA is top-down: one all-inclusive cluster is split repeatedly. (Key point: Divisive)

## Related in Data Mining

- [Need of clustering; hierarchical vs partitioning; K-means](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Acluster-need-hier-vs-partition-kmeans) — Data Mining, chapter 5
- [Short note: Partitioning and hierarchical clustering](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Apartition-hierarchical-clustering-note) — Data Mining, chapter 5
- [Hierarchical clustering: AGNES and DIANA](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aagnes-diana) — Data Mining, chapter 5
- [Major clustering approaches](https://www.bctengineer.com/question.md?key=semester_7%2Fdata_mining%3Aclustering-approaches) — Data Mining, chapter 5
