Pattern recognition

Professor : Godfried Toussaint

K-means algorithm

The team :
Pierre Didier
Laurent Bonnefille

K-means clustering splits a set of objects into a selected number of group.

How to use the applet :

- press "clear" to erase the data points
- press "run" to run the algorithm and then press "next step" to see each step
- press "unlock" to add or drag points while the algorithm is running
- press "reset" to get random points
- first scroll bar : to change the number of points
- second scroll bar : to change the number of classes - left mouse button : to add points
- riht mouse button : to delete points

K-means algorithm :

- choose NC random points (NC : number of classes)
- find the closest points to each of those points to get classes

loop
- compute the mean of each class
- find the new classes (the closest points) considering the mean as the center of the class
- if no point has changed of class, the algorithm is finished