Scratch implementation of the k-means clustering algorithm, often used in machine learning Press "Space" to replay the clustering Use the slider to change the number of clusters (though 3 is recommended)
The dots represent different data points in 2D, the colors represent the clusters they belong to, and the black dots represent the centers of their respective clusters. I don't have time to go in depth on how it works, but if you're interested, wikipedia's got you: https://en.wikipedia.org/wiki/K-means_clustering