Aleksey
Nozdryn-Plotnicki

K-means Clustering
Interactive Demonstration
Home

About
Contact
@alekseynp
email
Linkedin
Blog

Projects

Create Visualisations
Info Wheel (4-level)
Info Tree (4-level)
K-means Clustering
Global Games, Regional Sports
London 2012
Vancouver 2010
Passing Direction
Paid to Win
English Football Value
Who won the Olympics?

"In data mining, k-means clustering is a method of cluster analysis which aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean." - K-means clustering, Wikipedia

Use the 2D demonstration below to experiment with the standard Lloyd's algorithm to develop an intuition for the technique. You can try differently generated data, or select Manual to click in your own data points.

The algorithm is quite simple. At first a random set of cluster centres is initiated. Points are then assigned to their nearest centre. Centres are adjusted to match the centre of all points assigned to them. The assignment and adjustment steps are repeated until the centres no longer move.

K-means Demonstration

Controls


Click and drag circles.
Data Generation
Method:
Points:
Clusters:
constant data cluster size
K-means
Clusters:
show history