Borrar filtros
Borrar filtros

svd - what are the principal components?

2 visualizaciones (últimos 30 días)
sas0701
sas0701 el 26 de Feb. de 2014
Editada: Wayne King el 26 de Feb. de 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?

Respuestas (1)

Wayne King
Wayne King el 26 de Feb. de 2014
Editada: Wayne King el 26 de Feb. de 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()

Categorías

Más información sobre Eigenvalues en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by