バイプロットで表示したデータの色分けを行う方法(biplot,pca)
古いコメントを表示
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)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で 次元削減と特徴抽出 についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!