K-means clustering

K-means clustering is our first example of an unsupervised machine learning model. Remember this means that we are not making predictions; we are trying instead to extract structure from seemingly unstructured data.

Clustering is a family of unsupervised machine learning models that attempt to group data points into clusters with centroids.

Note

Definition:

Cluster: A group of data points that behave similarly.

Definition:

Centroid: The center of a cluster. Can be thought of as an average point in the cluster.

The preceding definition can be quite vague, but it becomes specific when narrowed down to specific domains. For example, online shoppers who behave similarly might shop for similar things or at similar shops, whereas similar ...

Get Principles of Data Science now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.