This is a simple demonstration of the k-means clustering algorithm.

Select some points, and click submit. An example with its solution is already shown.

Number of classes:

**Initialization**It is initilized by randomly choosing K of the input points and using those as the cluster centers.

**Termination**It runs for 20 iterations, or until the labeling does not change. For these demos (small number of points in two dimensions), it often converges in 2-5 iterations.