I have a 2400x12 data which I would like to classify using kmeans. Can anybody tell me how I can see the output of kmeans? Thanks.

有帮助吗?

解决方案

As the other guy said, you can't 'see' 12 dimensions. However, you may be able to use PCA to deal with that (check PCA in wikipedia). Assuming that the data variable is called Data:

[c, s] = princomp(Data);
plot(s(:,1), s(:,2),'.');

The rows in s are related to the rows in Data, so you can plot using different symbols for different clusters. For instance:

U=kmeans(Data,2);
[c, s] = princomp(Data);
plot (s(U==1,1), s(U==1,2), 'x');
hold on;
plot (s(U==2,1), s(U==2,2), '*');
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top