Visualizing K-Means algorithm

K-Means is a popular and simple clustering algorithm...

Steps to execute K-Means

  1. Initialization: K centroids are randomly initialized
  2. Assignment step: Each of the N data-points is assigned to the nearest cluster
  3. Update step: New centroids are computed by averaging datapoints in each cluster
  4. Repeat until datapoints stop changing clusters
Below is a simulation of K-Means...


  • Click figure or press [Step] to continue.
  • Press [Restart] to reset centroids.
  • Press [New] to start a new simulation.