# Selecting number of clustering classes automatically

I am working in text clustering. I would like to find a way to identify the number of classes for the clustering process automatically rather than proving the number of class manually. Is their any proof or model for this?

• What is the clustering method you're using? – Jundiaius Jun 16 '14 at 11:36

There are a number of methods to do this; the one that I find most intuitive is the elbow method. To perform this analysis, plot a graph of the number of clusters versus your error; if there is a number $n$ after which increasing the number of clusters doesn't reduce the error by much, but decreasing the number of clusters significantly increases your error, pick $n$ to be the number of clusters.