- Initialization: Create N nodes (circle) and randomly put initial K cluster (cross).
- Assignment step: Assign each node (circle) to the nearest cluster (cross).
- Update step: Each cluster (cross) move to the centroid of its nodes.
- Go to step 2.
For running this project, just download the repo and open index.html in your browser. No npm install needed, no node involved.
This project make use of bootstrap from CDN for theming and babel-standalone CDN for transpiling javascript es6 to es5.
Check out index.js for configuration variables.
NUM_CLUSTERS = Number of clusters
NUM_POINTS = Number of points
MULTIPLY = Multiply results for better view in html