Clustering groups unlabeled data points into similar clusters. It helps reveal structure when no label tells you what each point represents, and it can also simplify data for later supervised learning. section 2.10 section 2.17
Grouping emails by visible features
Suppose an email dataset has no spam or ham labels. A clustering algorithm can group messages using features such as message words, sender, attachment count and size, or link types. In a small dataset, size and recipient count may reveal three natural groups; people can then label those groups as Personal, Social or Promotions. section 2.11
Clustering can organize data in several practical ways:
- Group houses by location, price, size, or a combination of these features. section 2.11
- Group images by similarity, potentially separating dogs from cats or grouping animals by breed. section 2.10
- Reduce the number of dataset rows by combining similar rows into clusters. section 2.13
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 nine-email dataset, which records message size and recipient count before clustering. 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.
View how plotting email size against recipient count makes three clusters easier to see than inspecting rows alone. section 2.11























