Is there any matlab function for K-means++ with handling missing data?

5 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

John D'Errico
John D'Errico am 1 Aug. 2016
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.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by