K-means clustering output matrix C (represent centroid locations)
16 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am using kmeans clustering function to cluster a principal components matrix (pcs) with dimension 13149x10, where each column of the pcs matrix represent a principal component with decreasing order of explained variance. The number of clusters that I want to use is k = 8. I want to plot the location of the 8 centroids resulting from the kmeans algorithm, but the output matrix C (which gives the location of the centroids) has a size of 8x10 (k-by-p). Why there are 10 columns/ooordinates in C to define the position of each centroid? It shouldn't it be 2 columns?
The command that I am using is this:
[idx,C,sumd,D] = kmeans(pcs(:,1:10),k,'Replicates',10,'Start','cluster');
Appreciate your help.
Thank you!
0 件のコメント
採用された回答
the cyclist
2022 年 9 月 22 日
You have 8 centroids, each of which is a point in a 10-dimensional space. Each row gives the 10 coordinates needed to locate that centroid in 10 dimensions.
I'm not sure why you expected 2 columns.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!