K means for multidimensional data
古いコメントを表示
Hi everyone. I am trying to perform Raman spectral analysis using K-means clustering . I have 100 spectrums over 534 variables(in a matrix of 100 x 534).
Now I want to cluster 100 objects .How can I do so?
I am trying with this code, K= 12 found out by iteration. Now I have to find a plot of this for my data . Please help .
K=[ ];
sa=[ ];
for k=1:20
[idx c sumd]= kmeans(matrix,k);
sa= [sa sum(sumd)];
K= [K k];
end
plot(K,sa);// to find appropriate k
idx = kmeans(matrix,12);
gscatter(scoress(:,1),scoress(:,2),scoress(:,3),idx);//
now here I need to plot the data for all the columns rather than just 2 columns. How can I do so?
1 件のコメント
Image Analyst
2020 年 6 月 13 日
編集済み: Image Analyst
2020 年 6 月 13 日
So you have 100 observations for each absorbance (wavenumber). The absorbance at each wavenumber are the features. And now you want 12 clusters which will classify each spectrum into one of 12 possible classes? Can you attach your matrix so we can try it?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で k-Means and k-Medoids Clustering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


