Animated Statistics Using R (to be moved to AniWiki!)
Instructions
Theory of K-Means Cluster Analysis

 

 

 

 

Demonstration

The animation below has shown how 600 sample points are clustered into 3 groups: first select 3 centers randomly, then compute distances of each point to these centers, and according to those distances, we can know which group every point belongs to -- till now a single step of K-Means cluster algorithm has been finished. Then move the centers (e.g. re-compute the average locations of each group) and continue the computation of distances. Repeat so on and so forth... till the members of each group won't change any more, or the maximum number of iterations has been reached.

loading animation frames...
80%
Time Interval: seconds;