pg.ddx.io  pgsql-students@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Atri Sharma <atri.jiit@gmail.com>
To: Maxence AHLOUCHE <maxence.ahlouche@gmail.com>
Cc: Iyer, Rahul <Rahul.Iyer@emc.com>
Cc: pgsql-students@postgresql.org <pgsql-students@postgresql.org>
Cc: devel@madlib.net <devel@madlib.net>
Cc: Philip, Sujit <Sujit.Philip@emc.com>
Subject: Re: GSoC project: K-medoids clustering in Madlib
Date: Sat, 20 Apr 2013 18:30:31 +0530
Message-ID: <2DAD673D-4C46-4039-9D83-AE0D5C16764C@gmail.com> (raw)
In-Reply-To: <CAJeaomWgP_DeuXnpO0zTVMjX12Lq8_DHSOQ9vpV52cucEhu_sg@mail.gmail.com>
References: <e73a46bc-2c53-4290-b613-379be268d163@default>
	<7F4B7333-168C-4CFC-BBAF-E6B374273134@emc.com>
	<CAJeaomXfCTcLz2=pNCMU3qRSrsG16WOr9eWrR5VvinEz7UkgVQ@mail.gmail.com>
	<CAJeaomWgP_DeuXnpO0zTVMjX12Lq8_DHSOQ9vpV52cucEhu_sg@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-students>



Sent from my iPad

On 20-Apr-2013, at 16:11, Maxence AHLOUCHE <maxence.ahlouche@gmail.com> wrote:

> 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
>> 
>> 
>> 

Very interesting! The results look encouraging,although this is on Python :)

Good work!

Regards,

Atri=

view thread (24+ messages)  latest in thread

Message-ID: <2DAD673D-4C46-4039-9D83-AE0D5C16764C@gmail.com>
Permalink:  ../2DAD673D-4C46-4039-9D83-AE0D5C16764C@gmail.com/
Also on:    postgresql.org/message-id/2DAD673D-4C46-4039-9D83-AE0D5C16764C@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-students@postgresql.org
  Cc: atri.jiit@gmail.com, maxence.ahlouche@gmail.com, Rahul.Iyer@emc.com, devel@madlib.net, Sujit.Philip@emc.com
  Subject: Re: GSoC project: K-medoids clustering in Madlib
  In-Reply-To: <2DAD673D-4C46-4039-9D83-AE0D5C16764C@gmail.com>
  References: <e73a46bc-2c53-4290-b613-379be268d163@default> <7F4B7333-168C-4CFC-BBAF-E6B374273134@emc.com> <CAJeaomXfCTcLz2=pNCMU3qRSrsG16WOr9eWrR5VvinEz7UkgVQ@mail.gmail.com> <CAJeaomWgP_DeuXnpO0zTVMjX12Lq8_DHSOQ9vpV52cucEhu_sg@mail.gmail.com> <2DAD673D-4C46-4039-9D83-AE0D5C16764C@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox