How is it possible to identify quickly (without doing many tests) an approximative number of clusters from a dataset which is not vary large, even if this value is not the correct number of clusters, I just want to identify a reasonable value representing the number of clusters from this small dataset.

Note1: that I don't want to do many tests and/or cross-validate just to find an optimal number of clusters (time is important for me).

Note2: I know that there is no way to automatically set the "right" K nor is there a definition of what "right" is. I just want a reasonably approximative value.

  • 3
    $\begingroup$ One. One cluster is always "reasonable" (a somewhat subjective criterion...) and takes only O(1) time, effort, and RAM to compute :-). Lest this seem facetious or non-constructive, my point is that this question really needs some clarification and additional information to be answerable: what are you clustering; why are you doing so; what really does "reasonable" mean, and exactly what would constitute an "optimal" number in this situation? $\endgroup$ – whuber Mar 12 '12 at 19:01
  • 1
    $\begingroup$ BTW, I see you know how to accept answers, because you have accepted one out of your 11 questions so far. Is there a problem with the replies you have received for the other 10 that causes you not to accept any of those answers? $\endgroup$ – whuber Mar 12 '12 at 19:03
  • $\begingroup$ When it's relatively small, why is time an issue? $\endgroup$ – Has QUIT--Anony-Mousse Mar 13 '12 at 0:13
  • $\begingroup$ I downvoted the question because you didn't tell the number of variables or cases nor the software package(s) you have available. $\endgroup$ – rolando2 Apr 12 '12 at 0:45

In Mathematica there is a very useful function that might help you (FindClusters):

FindClusters[{1, 2, 10, 12, 3, 1, 13, 25}]

finds clusters of nearby values and gives you this output:

{{1, 2, 3, 1}, {10, 12, 13, 25}}

You can also search for an exact number of clusters (in this case 4):

FindClusters[{1, 2, 10, 12, 3, 1, 13, 25}, 4]

{{1, 1}, {2, 3}, {10}, {12, 13, 25}}


might want to have a look at gap statistic



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.