
Machine Learning • 161
K-MEANS CLUSTERING
What is k-means clustering? K-means clustering is a relative of principal
component analysis (PCA). e k-means clustering algorithm is a simple
method for estimating the mean (vectors) of a set of k-groups. A simple
explanation of the algorithm is as follows
7
:
1. Initial cluster seeds are chosen (at random).
2. e squared Euclidean distance from each object to each cluster is
computed, and each object is assigned to the closest cluster.
3. For each cluster, the new centroid is computed—and each seed value
is now replaced by the respective cluster centroid.
4. e squared Euclidean distance from an ...