Four items a,b,c,d have dissimilarities ab=2, ac=5, ad=9, bc=3, bd=8, cd=4.5. If you run agglomerative clustering with single, complete and average linkage, what are the merge order and heights for each, and which linkage shows the chaining effect?

Unsupervised learning, Hierarchical clustering
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can update a dissimilarity table under three linkage rules and see how the rule changes the tree.

Key idea

Single linkage uses the minimum pairwise dissimilarity between clusters, complete uses the maximum, and average (UPGMA) uses the mean over all cross pairs. Always merge the closest pair under the chosen rule, then recompute the distances from the new cluster.

Steps

  1. All three first merge a,b at height 2, the smallest entry.
  2. Single linkage. d(ab,c)=min⁡(5,3)=3, d(ab,d)=min⁡(9,8)=8, cd=4.5. The smallest is 3, so merge (ab) with c at height 3. Then d(abc,d)=min⁡(4.5,8,9)=4.5, so d joins at height 4.5. Heights: 2, 3, 4.5, and the tree is a chain (((a,b),c),d).
  3. Complete linkage. d(ab,c)=max⁡(5,3)=5, d(ab,d)=9, cd=4.5. The smallest is 4.5, so merge c,d first. Then d(ab,cd)=max⁡(5,3,9,8)=9. Heights: 2, 4.5, 9, and the tree is balanced ((a,b),(c,d)).
  4. Average linkage. d(ab,c)=(5+3)/2=4, d(ab,d)=(9+8)/2=8.5, cd=4.5. The smallest is 4, so merge (ab) with c at height 4. Then d(abc,d)=(9+8+4.5)/3=7.17. Heights: 2, 4, 7.17, with the same chain shape as single linkage.
  5. Compare. Single linkage joins d at 4.5 because it only needs one near pair (the chain b–c–d). Complete linkage waits until the farthest pair is close, giving height 9. The single-linkage tree shows chaining. Average linkage is in between.

Common mistakes

How long your answer should be

Half a page; 4–5 minutes, listing the merge order and heights for each linkage.

Read this

Previous in Unsupervised learning: Run DBSCAN with ε=2 and minPts=4 (counting the point itself) on the 1-D points {0,1,2,3,5,7,8,9,10,20}. Label each point as core, border or noise. What happens to the point 5?
Next in Unsupervised learning: A self-organising map has three neurons on a line with weight vectors w1=(0,0), w2=(2,0) and w3=(5,0). The input is x=(3,1), the learning rate is η=0.5 and the neighbourhood is h=exp⁡(−d2/(2σ2)) with σ=1, where d is the distance on the map between neurons (neurons 1, 2, 3 are at positions 1, 2, 3). Which neuron wins, and what are the three weight vectors after one update?