문제

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