I have small dataset of 15 points. K-means clustering 2 time gives me this result.

Besides the random initializing the centroids, what could a reason for this bizarre graph(1st one) that it has given? I am yet to understand this simple algorithm to full extent.

  • $\begingroup$ What's the difference between graph 1 and 2? Did you do anything different? Are you fitting 3 clusters? $\endgroup$ – Matthew Gunn Nov 4 '16 at 20:41
  • $\begingroup$ How many iterations of the k-means clustering are you doing in each case? That could possibly have an effect (related to random initialization). $\endgroup$ – MathIsKey Nov 4 '16 at 20:46
  • 2
    $\begingroup$ It got stuck in a local minimum. Here's a great run-down on the drawbacks of k-means clustering: stats.stackexchange.com/questions/133656/… $\endgroup$ – Phil Nov 4 '16 at 20:54
  • $\begingroup$ @AWashburn I Iterated it 10 times over the same dataset I have $\endgroup$ – linthum Nov 4 '16 at 23:52
  • $\begingroup$ @MatthewGunn : Yes I have fitting it with 3 clusters $\endgroup$ – linthum Nov 4 '16 at 23:53

If you choose the right-bottom-most two objects as starting points, the centers will remain stuck there, and never move to the top right.

The green points are closest to the green center, and will remain there.

This is a common problem with k-means because of random starting. A heuristic such as k-means++ is less likely to choose this starting situation.


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.