# Find the optimal number of number of clusters to best represent the data?

Given distance metric and N vectors, what would be algorithm or procedure to decide how many clusters to form ? My question is not how to cluster, but how to decide how many clusters is the most optimal number to use to represent the N vectors i.e. most economically.

To say it another way use the least number of clusters to represent the most of the N-vectors.

hmmm... if I have dendogram-graph would comparison of "nodes" distance at the same level qualify as a good way to approach the problem. thinking loudly : start from the root going down the levels until the average distance between 'cluster-nodes' reach some value ? How would I calculate that limit-value ? entropy?

## 1 Answer

Use variable numbers of clusters and devise a metric for analysing the quality of clusters in that scenario, for example the mean total cluster distance.

Starting with 1 cluster you might expect that your metric improves for each new cluster added. At some point the incremental improvement will be subjectively judged to no longer be significant and hence you have arrived at your 'optimal' value.

Commonly one might refer to an 'elbow point' where rapid improvement is quickly followed by limited further improvement.

This algorithm is rather rudimentary as it's basically a search many options and pick the most attractive.