liveBook · Manning

Hierarchical clustering

As explained in Grokking Machine Learning, Second Edition

Hierarchical clustering is a clustering algorithm that progressively groups the closest data points or existing groups into a hierarchy.

Hierarchical clustering groups the closest data points together, then continues grouping existing groups until well-defined groups emerge. section 2.11

Grouping emails

Imagine emails described by size and number of recipients. A plot reveals three well-defined clusters, which can be used to divide the emails into three categories. section 2.11

Table 2.1 A table of emails with their size and number of recipients
Email
Size
Recipients
1
8
1
2
12
1
3
43
1
4
10
2
5
40
2
6
25
5
7
23
6
8
28
6
9
26
7

Inspect the email sizes and recipient counts used to illustrate how data points can form groups. section 2.11

Figure 2.5 A plot of the email dataset. The horizontal axis corresponds to the size of the email and the vertical axis to the number of recipients. We can see three well-defined clusters in this dataset.

Use the plot to see three groups formed from email size and number of recipients. section 2.11

How Grokking Machine Learning, Second Edition covers it

How deep it goes
Defines the progressive grouping process but stops short of implementation details or a detailed treatment of unsupervised learning.
Examples
Uses an email dataset with message size and recipient counts, alongside video-recommendation groups based on user information and viewing history.
What you can do after
Evaluate/understand how progressively grouping nearby points produces well-defined categories.
How it connects
Connects hierarchical clustering with unsupervised learning, K-means clustering, DBSCAN, and Gaussian mixture models.

Also explained in

Compare how 8 books explain hierarchical clustering →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning, Second Edition. The section links point to the parts of the book it draws on.