Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Clustering images by hierarchical clustering

English · فارسی

Clustering images by hierarchical clustering

Computer Science Dept, Ferdowsi University of Mashhad

array([0, 0, 0, 1, 1, 1, 2, 2, 2], dtype=int64)
<Figure size 1000x300 with 3 Axes>
<Figure size 1000x300 with 3 Axes>
<Figure size 1000x300 with 3 Axes>
array([[ 3. , 5. , 11.38215326, 2. ], [ 6. , 7. , 14.68492426, 2. ], [ 1. , 2. , 15.82979712, 2. ], [ 8. , 10. , 24.22373583, 3. ], [ 4. , 9. , 27.95633024, 3. ], [ 0. , 11. , 30.62255948, 3. ], [ 12. , 14. , 57.55943682, 6. ], [ 13. , 15. , 107.55176707, 9. ]])
array([4, 3, 5, 8, 6, 7, 0, 1, 2], dtype=int32)
<Figure size 700x300 with 1 Axes>
<Figure size 640x480 with 9 Axes>

Exercises

  1. Run Ward linkage on a downsampled image, cut the dendrogram at K=3K=3 and display the three regions. Compare with the k-means result of the previous page.

  2. Measure runtime and memory as the number of pixels doubles, and explain the O(n2)O(n^2) memory term of the linkage matrix.

  3. Show on a smooth gradient image that single linkage produces long chains, and explain why Ward does not.