A centroid is the representative center of a cluster: the mean position of its assigned data points. In k-means, each point joins its nearest centroid, then every centroid moves to the mean of its cluster. section 6.2
Use centroids through this repeated k-means cycle:
- Normalize dimensions when their magnitudes are not comparable; z-scores provide one normalization method. section 6.2
- Initialize one centroid for each requested cluster, assign every point to its nearest centroid, and recompute each center coordinate by coordinate using the mean. section 6.2
- Treat random initialization, the choice of k, outliers, and high-dimensional data as practical limitations; k-means++ and user-selected starting regions offer alternatives. section 6.4
Clustering governors
Represent each governor with longitude and age, normalize the dimensions, and run k-means with k = 2. One resulting cluster grouped several western states with relatively old governors, but randomized centroids can produce different results, so repeated runs and human interpretation are necessary. section 6.3






