k-means clustering

2 views (last 30 days)
ramya
ramya on 21 Jul 2011
How do i use Inter-class factor and Intra class factor in k-means algorithm to find out the number of clusters which can be formed in the given data.

Answers (1)

Walter Roberson
Walter Roberson on 22 Jul 2011
The maximum number of clusters that can be formed is equal to the number of points.
You are again trying to determine the number of clusters that you "should" use for a blind data source, and that is something that simply cannot be done without deciding ahead of time which measurements and parameters you will use to decide whether a certain number of clusters is "better" than a different number of clusters.
k-means has absolutely no idea of what the "right" number of clusters is: k-means is strictly an algorithm that deals with finding the best clustering given a specific number of clusters ahead of time. Comparing results between different numbers of clusters is something that there is no one "right" answer for: it depends upon your purposes and your definitions.
  3 Comments
Oleg Komarov
Oleg Komarov on 22 Jul 2011
You can assume a trial and error approach. Use different k, say k = 2:20, and run your analysis. I would generally try to identify the k which keeps results robust to cluster ordering and composition.
Walter Roberson
Walter Roberson on 23 Jul 2011
If you were to generate the timing analyses for several different k, then is there some means by which you could determine which was a "better" timing analysis?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!