From: | Atri Sharma <atri(dot)jiit(at)gmail(dot)com> |
---|---|
To: | Maxence AHLOUCHE <maxence(dot)ahlouche(at)gmail(dot)com> |
Cc: | "Iyer, Rahul" <Rahul(dot)Iyer(at)emc(dot)com>, "pgsql-students(at)postgresql(dot)org" <pgsql-students(at)postgresql(dot)org>, "devel(at)madlib(dot)net" <devel(at)madlib(dot)net>, "Philip, Sujit" <Sujit(dot)Philip(at)emc(dot)com> |
Subject: | Re: GSoC project: K-medoids clustering in Madlib |
Date: | 2013-04-20 14:59:41 |
Message-ID: | CAOeZVifHBMpaNcMyRhAtQE0=0kLGeF1ptekDkKLzjx1djxzCdQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-students |
On Sat, Apr 20, 2013 at 8:11 PM, Maxence AHLOUCHE
<maxence(dot)ahlouche(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Maxence AHLOUCHE | 2013-04-21 17:46:46 | Re: GSoC project: K-medoids clustering in Madlib |
Previous Message | Maxence AHLOUCHE | 2013-04-20 14:41:20 | Re: GSoC project: K-medoids clustering in Madlib |