Skip to content

notwintermute/kMeansToy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kMeansToy

Visualize and play with the kMeans algorithm.
This program uses the pygame library.

Controls:

G to generate random data.
D to change random data type.
S to take a step of k-means.
Q to randomly add another cluster.
A to delete most recent cluster.
W to randomly assign centroids.
T to toggle trails.
X to toggle Centroid / Draw modes.

Centroid Mode (default):
Left click to add a centroid at your cursor.
Right click to remove nearest centroid (highlighted by a white circle).
C to change the color of the nearest centroid.

Draw Mode:
Left click to draw points.
Right click to delete points.
C to clear the data.
E/D to increase/decrease brush size.
R/F to increase/decrease brush density.

About

Toy that visualizes the k-Means algorithm. Video of it in action: https://www.youtube.com/watch?v=ZZtG42HpcbI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages