How can I cluster while forcing the final clusters to have more or less the same number of objects?
I have just tried
kmeans in R, and it does not take this into account.
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.Sign up to join this community
Clustering is meant to discover structure in the data. Not just partition it with some constraints. I figure you may want to look into data partitioning strategies instead.
Anyway, k-means can be quite easily modified to ensure you have equally sized partitions (they will be just even less meaningful than k-means already are).
Essentially, you build cluster transfer lists. Every object can "vote" to switch to another cluster. But instead of being immediately transferred to the preferred cluster (as in regular k-means), you enforce the transfers to be symmetric: each cluster may only lose as many objects as it receives.