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

From Atri Sharma
Subject Re: GSoC project: K-medoids clustering in Madlib
Date
Msg-id CAOeZVifHBMpaNcMyRhAtQE0=0kLGeF1ptekDkKLzjx1djxzCdQ@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  (Maxence AHLOUCHE <maxence.ahlouche@gmail.com>)
List pgsql-students
On Sat, Apr 20, 2013 at 8:11 PM, Maxence AHLOUCHE
<maxence.ahlouche@gmail.com> wrote:
> Sure!
>
> The k-means algorithms tries to group the points, but how can we know to
> which group a point has been assigned?
> What I mean is that, on the output, I would like to color the points with
> the same color as the centroid they "depend" on.
>
> And another question, which I thought could be related to the first one, is
> why does the algorithms returns the objective function? What's its use?
>
> Thanks ffor spending time for my questions :)


No problem

You can probably maintain a data structure for this purpose. A simple
Vector would suffice, I think. You will need to empty the Vectors in
each iteration of the algorithm, until the algorithm doesnt finish.
Then, the vectors shall contain the final memberships.

So, for each Vector, you designate the current centroid and put the
points assigned to that centroid's groups in that Vector. Then, if
another iteration of your algorithm shall run, you can empty the
vectors and reassign the centroids.

Atri
--
Regards,

Atri
l'apprenant


pgsql-students by date:

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