Back to the 2025 paper

Unit 4: Advanced Topics & Clustering

20257m

Write short note on: Hierarchical Clustering

Worked SolutionAI Assisted

Hierarchical Clustering:

Unsupervised method building hierarchy / dendrogram of clusters — tree where leaves = points, internal nodes = merges/splits at certain distance.

Two approaches:

  1. Agglomerative (Bottom-Up) — most common:

    • Start each point as cluster.
    • Repeat: find two closest clusters via linkage, merge, update distances.
    • Stop at k=1k=1 or desired kk (cut dendrogram).
    • Linkages:
      • Single linkage: d(Ci,Cj)=min⁡x∈Ci,y∈Cjd(x,y)d(C_i,C_j)=\min_{x\in C_i,y\in C_j} d(x,y) — produces elongated chains, sensitive to noise
      • Complete: max⁡\max distance — compact spherical clusters
      • Average: mean distance
      • Ward: minimizes increase in within-cluster SSE Δ=SSEmerged−SSEi−SSEj\Delta = SSE_{merged}-SSE_{i}-SSE_{j} — often best, prefers equal-sized.
    • Complexity O(n3)O(n^3) naive, O(n2log⁡n)O(n^2\log n) with heap, O(n2)O(n^2) memory.
  2. Divisive (Top-Down):

    • Start one cluster, recursively split (e.g., via K-means), rarer due to exponential.

Dendrogram: Height = distance at merge; cut at height hh gives clustering. Can inspect for natural kk.

Advantages: No preset kk needed (choose after), shows structure at multiple resolutions, deterministic, visualization.

Disadvantages: Greedy (once merged cannot undo), sensitive to outliers/noise (single linkage), O(n2)O(n^2) memory limits large data, difficult to handle large nn (>10k).

Example: Data points (1,2),(2,2),(8,8): single linkage merges first two at dist 1, then merges with (8,8) at ~8.5 distance dendrogram.

Use: Gene expression phylogeny, document taxonomy, small-medium datasets where hierarchy insightful. Often combined with K-means for scale.

Similar questions

Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.