| Statistics Toolbox | ![]() |
Principal Components Analysis (PCA) using the covariance matrix.
Syntax
pc = pcacov(X) [pc,latent,explained] = pcacov(X)
Description
takes the covariance matrix [pc,latent,explained] = pcacov(X)
X and returns the principal components in pc, the eigenvalues of the covariance matrix of X in latent, and the percentage of the total variance in the observations explained by each eigenvector in explained.
Example
load hald
covx = cov(ingredients);
[pc,variances,explained] = pcacov(covx)
pc =
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
References
Jackson, J. E., A User's Guide to Principal Components, John Wiley and Sons, Inc. 1991. pp. 1-25.
See Also
barttest, pcares, princomp
| pareto | pcares | ![]() |