Hierarchical Clustering and the Dendrogram
Harban AI LABS
0:00 / 0:00
Hierarchical Clustering and the Dendrogram
13 просмотров · 9 дн. назад
Harban AI LABS
45 подписчиков
13 просмотров · 9 дн. назад
Hierarchical clustering explained: agglomerative clustering, linkage methods and how to read a dendrogram.
K-means asks for the number of clusters before it starts. Hierarchical clustering does not: every point starts alone, the two closest clusters merge, and that repeats until one cluster is left. The order of the merges is a tree, the dendrogram, and you choose the number of clusters afterwards by cutting it. This video does all five merges by hand on six made-up points and grows the dendrogram next to them.
You will learn:
Agglomerative clustering step by step: find the two closest clusters, merge, repeat
How to read a dendrogram: the height of a bracket is the distance at which two groups merged
How cutting the tree at a height gives the clusters, and the "longest gap" rule of thumb
The four linkages: single, complete, average and Ward, with the numbers for one pair of groups
A real comparison where the four linkages disagree, and what "chaining" means
What it costs (memory grows with the square of the number of points) and when to use it
Divisive clustering in one sentence
The settings of AgglomerativeClustering in scikit-learn, and SciPy's linkage and dendrogram
All data in this video are made up for teaching.
Chapters
0:00 No number of clusters chosen in advance
0:42 Merging by hand: six points
2:07 How to read a dendrogram
2:34 A question: cutting the tree
3:33 Four linkages: single, complete, average, Ward
4:20 A real comparison, and chaining
5:10 What it costs, and when to use it
5:55 AgglomerativeClustering in scikit-learn
6:36 Recap + try it yourself
Try it yourself: four points on a number line at 0, 1, 3 and 7, single linkage. (1) At which three heights do the merges happen? (2) Where does the longest-gap rule cut the tree?
Animations made with Manim Community Edition. The narration is a synthetic voice.
#MachineLearning #Clustering #AIEngineer
More from Harban AI Labs: https://harban-ai-labs.vercel.app/