Hi all!
I've had a bit of fun with the k-means clustering, and have made a small script to visualize the result of the classification.
However, I couldn't guess how to assign a cluster to a point from the output of the algorithm, could someone give me an indication, please?
Before your first use, you may want to change the settings (on top of the file) to connect to your PostgreSQL server.
The script will create a table in your database, populate it with random groups of points, and then call the k-means algorithm on it. Finally, it will generate a PNG image, displaying the points and the centroids.
For a first run, use something like this:
./k-means_test.py --regen -o clustered_data.png
You can call "./k-means_test.py -h" for a list of available options.
In attachment are my script and an example of its output.
By the way, I'll have a lot of work next week, as I have several exams coming and a big project to do (about empirical orthogonal functions), so I'll probably be inactive for a few days! Then I'll be on holidays, so I will be able to focus on MADlib and GSoC :)
Regards,
Maxence