-1
$\begingroup$

I'm learning some Data Retrieval concepts, one of them being K-means clustering. I understand that it's meant to help understand data, but that's where I begin having issues. I'm working on this problem

enter image description here

and I'm not sure how to approach it. This isn't a "just give me the answer" kind of thing either, I would actually like to know what the variables represent and how I would figure out the answer(s). If someone could explain it in a simple, understandable way, that would be greatly appreciated.

$\endgroup$
  • $\begingroup$ Here is animation. Keeping it simple - centroids are centers of clusters that constitute it. In your case $k~=~2$, and initial centroids are given. The first step is to assign points into clusters. In the next step you move the centroid to it's optimum - the mean error is the smallest. There are steps like dividing clusters (which will be probably ommited) and moving points to different clusters (I haven't checked if that is the case). Could you watch the video, try to assign points to clusters, recalculate centroids and state the problem? $\endgroup$ – Evil May 3 '16 at 2:00
  • $\begingroup$ Thank you, that clarified a lot. I would say that (-2,-2): (-4,2),(-2,-1),(1,-1) and (3,3): (3,2). But by what value do you calculate the new position? I know that you add the vectors of the points in the cluster, but what are the values? would it be (-4 + 2 -2 - 1 + 1 - 1) / 6 and (3 + 2) / 2? $\endgroup$ – Codarus May 3 '16 at 4:13
  • $\begingroup$ I would like to add some thing: there are more k-mean algorithms and it is also very often merged with several other algorithms. The distance calculated depends on the task, but here everything is given, so you need a bit more input on your side, because the picture encodes what to do. Also this site works the best for Q & A, it is not for iterative process, because the comments are for improvements. I am glad I could helped even a bit, but you should edit your question to fit the site rules / format. There are some subparts of your problem that might fit here. $\endgroup$ – Evil May 3 '16 at 16:34
  • $\begingroup$ So there are some good options: part of your question about K-means might be good Q or you might want to edit and leave the unknowns about K-means, but "please check my answer" is not very good Q. Hint only questions are not disallowed, but to remind - this is Q & A site, not Q & hint. I stretched the rules a bit, also comments are for improving the Q, but the mere hint is not good answer either. It would be nice if you could look at various resources and then improve the Q. And now I do not reply to the results because I feel like you still need to think about it a bit more. $\endgroup$ – Evil May 3 '16 at 17:07
0
$\begingroup$

First you need to find out which points are assigned to which cluster. It looks like you understand that part. Then you take the mean for each cluster. The mean is taken component-wise. So, for these 2-dimensional vectors (x, y) you need to take the means of all the x's and then separately the means of all the y's.

$\endgroup$
  • $\begingroup$ so (-4-2+1)/3 = -5/3 and (2-1-1)/3 = 0 would give (-5/3,0) , (3,2)? What about the error? $\endgroup$ – Codarus May 3 '16 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.