1. University MCA (AI/ML) Semester 2
  2. CAB212
  3. Unit 5

CAB212 · Unit 5: Unsupervised learning

Hierarchical clustering

6 practice questions

Key points

  • Agglomerative merges closest clusters
  • Dendrogram cut gives k
  • Single linkage chains; complete is compact
  • Ward minimises variance increase

Hierarchical clustering builds a tree of clusters (dendrogram) without fixing k in advance.

  • Agglomerative (bottom-up): start with each point as its own cluster and repeatedly merge the two closest clusters. Most common.
  • Divisive (top-down): start with one cluster and split.

Linkage defines cluster distance:

LinkageDistance between clustersBehaviour
SingleMinimum pairwise distanceChains; can find elongated shapes, sensitive to noise
CompleteMaximum pairwise distanceCompact clusters
AverageMean pairwise distanceCompromise
WardIncrease in within-cluster varianceCompact, similar sizes

Cutting the dendrogram at a height gives a chosen number of clusters. Cost is at least O(n^2) memory and time, so it suits small to medium data.

Exam pitfall: the dendrogram height at a merge shows how dissimilar the merged clusters are.

Try two questions

Question 1 · Tier 4, Analyse

The chaining effect (long, straggly clusters) is most associated with:

  1. K-means
  2. Ward linkage
  3. Complete linkage
  4. Single linkage
Show the answer

D. Single linkage merges via nearest points, linking clusters through bridges.

Question 2 · Tier 2, Understand

Agglomerative clustering starts with:

  1. Each point as its own cluster
  2. One cluster containing everything
  3. k random centroids
  4. A decision tree
Show the answer

A. It merges bottom-up.