成分分析中biplot函数不理解_主成分分析
对主成分分析中的biplot函数不理解,谁能帮忙解释?谢谢了
解答:
运行下面的例子,理解我加黑的那句话即可:
Examples
Perform a principal component analysis of the data in carsmall.mat:
load carsmall
x = [Acceleration Displacement Horsepower MPG Weight];
x = x(all(~isnan(x),2),:);
[coefs,score] = princomp(zscore(x));
View the data and the original variables in the space of the first three principal components:
vbls = {‘Accel’,’Disp’,’HP’,’MPG’,’Wgt’};
biplot(coefs(:,1:3),’scores’,score(:,1:3),…
‘varlabels’,vbls);
又基本上看了一个下午,我的时间啊!!不过基本上搞明白了
1.图只能表示二个或三个主成分的载荷,这是其缺点,所以往往只看重点主成分。
2.红点代表二个或三个观测值主成分值,如二维图,红点横坐标就是主成分1的值,纵坐标就是主成分2的值。但都是经过一定的量化。(Scale the scores so they fit on the plot, and change the sign of their coordinates according to t