error occurred while executing a kmeans function
显示 更早的评论
Error using kmeans/batchUpdate (line 376) Empty cluster created at iteration 1.
Error in kmeans (line 280) converged = batchUpdate();
Error in testing1 (line 28) [cr,ccr] = kmeans(R,10) the above error occurred while executing a program for kmeans clustering. kindly help me out.
4 个评论
the cyclist
2014-3-10
It is essentially impossible to diagnose this without seeing your code.
Can you provide the smallest possible code (and data) that will replicate this issue? Oftentimes, doing this may help you discover the problem yourself.
dpb
2014-3-10
Not enough info...most likely it's a data input problem that doesn't have sufficient numbers to allow for 10 clusters or the data is so tightly grouped that many of the requested 10 are empty even if appears to be sufficient DOF overall.
That the message is "Empty cluster" on first iteration makes one or the other (or both) of the above likely imo...
Cut down the number of clusters requested altho would likely do well to use scatter or some other visual tools to visualize the data prior to just blindly asking kmeans to do its thing...
chethan
2014-3-18
Walter Roberson
2014-3-20
Look at the documentation page, at the 'emptyaction' option.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 k-Means and k-Medoids Clustering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!