バイプロットで表示したデータの色分けを行う方法(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!