How to extract the features of each cluster in the k means clustering?
8 次查看(过去 30 天)
显示 更早的评论
Hi ,
I need to extract the attributes of each cluster obtained from k means clustering. Is there any methods for that? Suggestions are appreciated
0 个评论
回答(2 个)
KSSV
2021-6-23
If idx are the indices obtained from kmeans. You can plot the data using gscatter. Read about it. If A is your data, you can pick the required cluster feaures using.
A1 = A(idx==1,:) ; % this igves features for clister 1
You can use the cluster index and extract what you want.
0 个评论
Walter Roberson
2021-6-23
No. There are an uncountable infinity of possible "features" for any given set of points, even if the set of points is a finite set of points each of which has a finite representation.
A "feature", mathematically, is any deterministic calculation of the inputs that returns a scalar.
If you wanted to take an image and reorder it as a vector and use the bytes as if they were representing a base 256 integer, and you wanted to calculate the median of the prime factors of that integer... then that would be a feature.
Most features are not useful for any kind of data classification purposes, but they are still features.
... The point here being that you asked to extract "the features", as if there were a specific list of "features" for the clusters, but that is not the case.
If you had some specific features in mind, then there might happen to be existing MATLAB functions or File Exchange Contributions to calculate them.
2 个评论
Walter Roberson
2021-6-23
You will need to do research. Perhaps there are papers that describe features that people have found to be useful in such cases. If not, then you will need to start researching lists of features that people have found useful for something and start trying them all and keeping the ones that turn out to be useful.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!