Azzera filtri
Azzera filtri

svd - what are the principal components?

3 visualizzazioni (ultimi 30 giorni)
sas0701
sas0701 il 26 Feb 2014
Modificato: Wayne King il 26 Feb 2014
Hi, I have X = [25, 2000] i.e. 25 subjects and 2000 values (i.e. each subject has a spectrogram that is reduced to 2000 values).
My goal is to reduce from 25 subjects to 1 or 2 "subjects" that best explains the data across the group.
If I do [u,s,v]=svd(X) (in matlab) or [u1,s1,v1]=svd(X')
What would be 1st and 2nd principle components?
Is it just columns of v (in first case) or columns of u (in transposed case)
OR do I have to do T = vX or T=uX and then the 1st and 2nd row of this?

Risposte (1)

Wayne King
Wayne King il 26 Feb 2014
Modificato: Wayne King il 26 Feb 2014
To compute the principal components using the SVD, I think you first want to center the data and compute something at least proportional to the covariance matrix of the data (not just using svd on the data matrix).
If you have the Statistics Toolbox, use pca() that is your best bet.
If you do not and must use svd(), then you really want the eigenvectors of the covariance matrix. In which case you can use eig()

Categorie

Scopri di più su Eigenvalues in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by