K-means clustering visualizer
Watch k-means find groups in data with no labels - the centres moving and points changing sides, iteration by iteration.
How k-means works
Place k centres. Give every point to its nearest centre. Move each centre to the middle of its points. Repeat until nothing moves.
NeuroScope shows each of those two steps on its own, so you can see why the centres settle where they do - and how a different start can end somewhere else.
Real data, honest scores
Start with 272 eruptions of the Old Faithful geyser (two clear groups), segment 440 wholesale customers, or cluster wheat seeds and compare the clusters with the real varieties.
Each clustering is scored by its silhouette (how tight and well separated the groups are) and, when the true classes are known, by how well it matches them. Try the elbow plot to choose k, then compare with DBSCAN and hierarchical clustering.
Try it in a minute
- Press Try it now - Old Faithful and k-means with 2 clusters are set up for you.
- Press Fit k-Means and step through the iterations.
- Try 3 clusters, or switch to DBSCAN, and compare the silhouette.
Questions
What is a good silhouette score?
From -1 to 1; above about 0.5 means clearly separated groups. Old Faithful reaches about 0.73 with two clusters.
Can I use my own data?
Yes - upload a CSV, set the target to none, and pick a clustering algorithm.
Which clustering algorithms are there?
K-means, DBSCAN and hierarchical (agglomerative) clustering, each with its own step-by-step view.