Re: GSoC project: K-medoids clustering in Madlib
От | Atri Sharma |
---|---|
Тема | Re: GSoC project: K-medoids clustering in Madlib |
Дата | |
Msg-id | CAOeZVifHBMpaNcMyRhAtQE0=0kLGeF1ptekDkKLzjx1djxzCdQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: GSoC project: K-medoids clustering in Madlib (Maxence AHLOUCHE <maxence.ahlouche@gmail.com>) |
Ответы |
Re: GSoC project: K-medoids clustering in Madlib
|
Список | 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 по дате отправления: