バイプロットで表示したデータの色分けを行う方法(biplot,pca)
Afficher commentaires plus anciens
Matlab初心者です。
現在、データのクラスタリングを行い、得られた結果をPCAとバイプロットを用いて図示しようと悪戦苦闘しております。
下記の図にあるように,現在のコードでは全てのデータが赤色になってしまっています。
データをクラスターごとに色分けし,表示する方法がわかりません。
どうか知恵をお貸しいただけますでしょうか。
よろしくお願いいたします。
D=readmatrix("Test.xlsx");
[coeff,score,latent]=pca(D)
[idx,H,sumd]=kmeans(D,3,MaxIter=1000,Display="final",Replicates=5)
vbls = {'Depth','Sample','Ping','sea bottom mean','Length','Height','Perimeter','Area','BAmean','TAmean','Elongation','UNEVENNESS1','UNEVENNESS"','Lectangularity','Fractual demensiton','Circularity'};
figure
biplot(coeff(:,1:3),'scores',score(:,1:3),"VarLabels",vbls)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 次元削減と特徴抽出 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!