Why do I get this message : Error using kmeans ---X must have more rows than the number of clusters.
7 次查看(过去 30 天)
显示 更早的评论
Hello,
When I run a collegue script, i get this error message: Error using kmeans ---X must have more rows than the number of clusters. What are my option to solve this problem?
Thank you.
Andree
0 个评论
采纳的回答
Kelly Kearney
2014-1-15
How many data points do you have? And how many clusters are you attempting to create? You can't group 4 points into 5 clusters, for example.
0 个评论
更多回答(3 个)
Thulfiqar Hussein
2017-3-22
the value (X/K) should be integer number without fractions. for example if you have 10 objects and cluster them to 3 groups you will get 10/3 = 3.3 and this error will pop up, but if you cluster them to 2 or 5 groups there will be no problem.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!