K-means clustering output matrix C (represent centroid locations)
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Cluster Analysis and Anomaly Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!