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 software companies might make comparable software at comparable prices.
Here is a visualization of clusters of points:
In the preceding figure, our human brains can very easily see the difference between the four clusters. Namely that the red cluster...