clustring with the same number of point inside each cluster
3 views (last 30 days)
I have x and y coordinate of a set of points resulting in matrix X. As I know, idx = kmeans(X,k) is designed in a way that I can fix the number of clusters to k. However, I want to fix an additional parameter too. I want to fix the number of points inside each cluster too.
Let me give a simple example. Assume we have 99 points (and thier x and y coordinate in matrix X). Also, we know that there should be 11 clusters (that is k) and each one of clusters should contains 9 points inside. Do you have any ideas how I can force MATLAB to put exactly 9 points inside each cluster? It would be nice if it can be also shown as plot or gscatter. Thanks
Abhishek Kumar on 1 Sep 2020
Edited: Abhishek Kumar on 18 Sep 2020
As per my understanding you are able to use the k-means function in MATLAB, but you seek a functionality to fix number of points in each cluster as well. I would like to inform that such a functionality is not available right now with k-means functions. We, have recorded your issue and such a functionality might be available in upcoming releases.