A Tutorial on Clustering Algorithms

Introduction | K-means | Fuzzy C-means | Hierarchical | Mixture of Gaussians | Links

K-means - Interactive demo

This applet requires Java Runtime Environment version 1.3 or later. You can download it from the Sun Java website.


  • Choose how many data and clusters you want and then click on the Initialize button to generate them in random positions.
    Insert manually Data and Clusters using Right and Left mouse buttons. You can also delete them by clicking on them.
  • Move data and centers of clusters as you like by clicking and dragging.
  • Choose which metric the algorithm should use.
  • Click on Start to begin the simulation. During simulation data and clusters positions are fixed.
  • Go on using either Step or Run until the end of the simulation. Current number of steps is shown.
  • Use the Reset button to go back to the initial configuration. Now you can move existing data and centers of clusters or generate new ones and then begin another simulation.
  • When Show History is checked all the steps done until now are shown.

Back to K-means