![]() |
IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
|
Principal Component Analysis (PCA)
PCA formula:
Loadings are the eigenvectors of the X's scatter matrix. The scatter matrix is defined ad X'*X, a simmetric positive definite or semi-definite with rank r <= nf.
Meanings of the possible outputs:
scores: [no][r] PCA scores (r is the rank of the dataset's scatter matrix). loadings: [nf][r] loadings matrix. lambdas: [r]x[1] contains the eigenvalues of the scatter matrix.Note: the loadings vectors sometimes happen to point at the opposite directions of those obtaines by MATLAB's princomp() (not really a problem).
[1] R. O. Duda, P. E. Hart, and D. G. Stork, Pattern Classification, 2nd ed. New York: John Wiley & Sons, 2001.
Definition in file princomp2.m.
Go to the source code of this file.
Functions | |
| function | princomp2 (in X) |
| function princomp2 | ( | in | X | ) |
| X | [no]x[nf] matrix |
[loadings] or [loadings, scores] or [loadings, scores, lambdas]