Problem understanding PCA and eigenvectors of covariance matrix
Mostra commenti meno recenti
Hello everyone. I am currently working with the function pca, principal component analysis and also with the Karhunen-Loève expansion.
As far as I understand, in pca, the scores are equivalent to the eigenvectors of the covariance matrix.
I am working with a matrix called realizations, which is 144*5, meaning there are 144 observations of 5 random variables.
If I do the pca as
[coeff,score,latent,tsquared,explained,mu] = pca(realizations);
I obtain as score a matrix of size 144*5, as expected. However, if I write
covMat=cov(realizations)
The resulting matrix is a 5*5. Therefore, the eigenvectors (calculated using eig) of covMat are a 5*5 matrix too, instead of a 144*5, like in the case of the socres obtained using pca. As far as I know I am doing this right, since in the documentation of cov it says that rows are observations and columns are random variables.
Can someone please tell me the difference between both methodologies?
How can I get a eigenvector of length 144?
Best regards .
Jaime.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Dimensionality Reduction and Feature Extraction in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!