app搜索界面设计:matlab中pcacov这个命令的作用???

来源:百度文库 编辑:高校问答 时间:2024/04/29 19:41:17
[PC, LATENT, EXPLAINED] = pcacov(X) 中,x,pc,latent,explained分别代表的什么?
谢谢,啥意思?COEFF是不是特征向量?

pcacov

Principal components analysis (PCA) using the covariance matrix
Syntax

COEFF = pcacov(V)
[COEFF, latent] = pcacov(V)
[COEFF, latent, explained] = pcacov(V)

Description

COEFF = pcacov(V) performs principal components analysis on the p-by-p covariance matrix V and returns the principal component coefficients, also known as loadings. COEFF is a p-by-p matrix, with each column containing coefficients for one principal component. The columns are in order of decreasing component variance.

pcacov does not standardize V to have unit variances. To perform principal components analysis on standardized variables, use the correlation matrix R = V./(SD*SD')), where SD = sqrt(diag(V)), in place of V. To perform principal components analysis directly on the data matrix, use princomp.

[COEFF, latent] = pcacov(V) returns latent, a vector containing the principal component variances, that is, the eigenvalues of V.

[COEFF, latent, explained] = pcacov(V) returns explained, a vector containing the percentage of the total variance explained by each principal component.
Example

load hald
covx = cov(ingredients);
[COEFF, latent, explained] = pcacov(covx)

COEFF =

0.0678 -0.6460 0.5673 -0.5062
0.6785 -0.0200 -0.5440 -0.4933
-0.0290 0.7553 0.4036 -0.5156
-0.7309 -0.1085 -0.4684 -0.4844

variances =

517.7969
67.4964
12.4054
0.2372

explained =

86.5974
11.2882
2.0747
0.0397