Is there any provision to specify the cluster size for each cluster in Kmeans clustering algorithm in MATLAB?

17 次查看(过去 30 天)
Iam working on cell grouping for indoor small cell radio(dots).
For example we have 80 dots and we nned to group these dots into 10 cells(10 clusters each cell with 8 dots). i have used inbuilt kmeans() in matlab by passing dots xy positions and k(here k = 10) as:
dotsXY = [real(nodes.xy)',imag(nodes.xy)'];
dotGroup = kmeans(dotsXY,10)
Here iam successfully able to cluster the dots but each cluster is of different size. Since Iam new to clustering algorithm, it would be helpful if I get some suggestion/method to proceed futher in how to keep cluster size same for all cluster in kmeans algorithm.
Thanks in advance.

回答(2 个)

Cris LaPierre
Cris LaPierre 2024-4-2

Jon
Jon 2024-4-2
编辑:Jon 2024-4-2
The goal of k-Means clustering is to minimize the distance of the points in each cluster to the cluster centroid. As you note you can specifiy the number of clusters, but then the number of points in each cluster depends upon the location of the points you are clustering.
Imagine the extreme case, in 2d where you have say 100 points, 80 of them are identical and located at a point (1,1) and another 20 points are all identical and located at (2,2). If you choose two clusters, you will of course have 80 in one cluster and 20 in the other.
So in the above scenario, by what criteria would you want to put 50 of the points into a cluster at (1,1) and 50 at (2,2), Or, more generally, for this scenario where would you suggest putting the cluster centers if you wanted 50 points in each?

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by