Is there any matlab function for K-means++ with handling missing data?
3 次查看(过去 30 天)
显示 更早的评论
I have incomplete data. I would like to cluster the data. Data are incomplete, like this: 1 2 3 4 5 6 6 7 8 4 5 6 6 7 8 NaN NaN 2 5 6 7 that means contains some NaN values. N.B. I am using Matlab R2014b
2 个评论
采纳的回答
John D'Errico
2016-8-1
WANTING to cluster your data is fine, but nothing says that you can always get what you want. We all want lots of things, many of which may be impossible to achieve. The clustering tools in MATLAB do not allow for missing data. Sorry. You could try to write your own tool that does do so. Or you might try to find one. I don't know of any.
So just exclude any data points that are missing, and cluster those that remain.
I might point out the help for kmeans (at least in the current version) says:
"kmeans treats NaNs as missing data, and ignores any rows of X that contain NaNs."
Since you are using an older release, I cannot know if that capability is in your release or not. Regardless, it is trivial to drop those points, which is all that kmeans would do anyway. There simply is no good way to cluster a point that has missing values.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!