Re: GSoC project: K-medoids clustering in Madlib - Mailing list pgsql-students

From Maxence AHLOUCHE
Subject Re: GSoC project: K-medoids clustering in Madlib
Date
Msg-id CAJeaomWgP_DeuXnpO0zTVMjX12Lq8_DHSOQ9vpV52cucEhu_sg@mail.gmail.com
Whole thread Raw
In response to Re: GSoC project: K-medoids clustering in Madlib  (Maxence AHLOUCHE <maxence.ahlouche@gmail.com>)
Responses Re: GSoC project: K-medoids clustering in Madlib  (Atri Sharma <atri.jiit@gmail.com>)
List pgsql-students
Oops, forgot to attach the output!


2013/4/20 Maxence AHLOUCHE <maxence.ahlouche@gmail.com>
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?

My script is written in python3, and uses py-postgresql (http://python.projects.pgfoundry.org/) as PostgreSQL interface. It also requires Pillow (a PIL fork) which you can find here : https://pypi.python.org/pypi/Pillow/2.0.0.

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


2013/4/19 Iyer, Rahul <Rahul.Iyer@emc.com>

Hi Akansha, 

I am confused about the question - MADlib is open-source and available from Github. If you're having trouble in fork/clone or have a specific question about a module, we would be glad to help you. Please be specific about your question. 

- Rahul
---------------------------------------------------------
Rahul Iyer
Senior Software Engineer | Predictive Analytics
rahul.iyer@emc.com

On Apr 19, 2013, at 3:13 AM, Akansha Singh wrote:

Hi, MADLib guys, Any Updates..? On my Part I am trying to understand the modules placed in Github .I a trying to get hands on it. http://madlib.net/ https://github.com/madlib/madlib/




--
Maxence Ahlouche
06 06 66 97 00
93 avenue Paul DOUMER
24100 Bergerac



--
Maxence Ahlouche
06 06 66 97 00
93 avenue Paul DOUMER
24100 Bergerac
Attachment

pgsql-students by date:

Previous
From: Maxence AHLOUCHE
Date:
Subject: Re: GSoC project: K-medoids clustering in Madlib
Next
From: Atri Sharma
Date:
Subject: Re: GSoC project: K-medoids clustering in Madlib