Updating a Cluster Center by Averaging

For fixed assignments in ordinary Euclidean k-means, choosing the arithmetic mean of each nonempty cluster minimizes its sum of squared distances.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace two groups
  2. Check empty assignments
  3. Calculate each coordinate using assigned members only
  4. Define what happens when a cluster has no points

Trace two groups

A cluster containing 1 and 3 gets center two. A cluster at 8, 9, and 10 gets center nine. Constant squared loss gives the one-dimensional reason.

Check empty assignments

A chosen center can receive no examples. The training algorithm needs a rule for that case. See k-means alternating steps.[1]

Calculate each coordinate using assigned members only

For cluster members \((1,4),(3,0),(5,2)\), their center is \((3,2)\). Under squared Euclidean distances, this center minimizes the sum of squared differences for that fixed assignment. Other clusters do not enter the calculation. See the mean as a squared-error predictor.

Mean x: (1+3+5)/3=3
Mean y: (4+0+2)/3=2
Center (3,2)
Next assignment can move members between clusters

Define what happens when a cluster has no points

An empty cluster has no mean. Use the adopted algorithm's documented reinitialization or other policy. Check equal nearest-center distances and a cluster with one outlier.

References

  1. Gareth James et al., An Introduction to Statistical Learning ↩