liveBook · Manning

Clustering

As explained in Grokking Machine Learning

An algorithm that partitions data points into groups based on similarity.

Clustering groups data points that are similar, even when their labels are unknown. It can reveal patterns or make data easier to handle. section 2.3 section 2.5

Similarity depends on the data and features being considered:

  • Group houses by location, price, size, or a combination of these features. section 2.3
  • Group emails by size and number of recipients; a plotted example shows three clusters. section 2.3
  • Group unlabeled images by similarity, potentially separating cats from dogs or grouping breeds. section 2.3
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.

See how email size and recipient count form three visible clusters. section 2.3

How Grokking Machine Learning covers it

How deep it goes
Defines clustering and illustrates feature-based groupings, without detailing a clustering algorithm or evaluation method.
Examples
Illustrates grouping houses by features, emails by size and recipients, and images by animal similarity.
What it assumes
Distinguishes labeled from unlabeled data and introduces clustering through housing and email datasets.
What you can do after
Apply clustering to group unlabeled houses, emails, or images by selected similarities.
How it connects
Connects clustering to unsupervised learning, dimensionality reduction, and preprocessing before supervised learning.

Also explained in

Compare how 18 books explain clustering →

Related concepts

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