rectify error in kmeans

1 次查看(过去 30 天)
Elysi Cochin
Elysi Cochin 2013-1-12
i wanted to do kmeans clustering in mammogram image.... i took the datavector of the image and gave as input to kmeans.... when i execute the code error is displayed as...."An empty cluster error occurred in every replicate.".... what should i do to rectify this error....

采纳的回答

Tom Lane
Tom Lane 2013-1-14
The kmeans function has an option 'EmptyAction' that you could try. With this option you can request that, if a cluster becomes empty, the function either accept a smaller number of clusters or create a new one from a point that is relatively far from the others.

更多回答(1 个)

Greg Heath
Greg Heath 2013-1-13
Reduce k by 1.
Hope this helps.
Thank you for formally accepting my answer.
Greg

类别

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