svd - what are the principal components?

조회 수: 5 (최근 30일)
sas0701
sas0701 2014년 2월 26일
편집: Wayne King 2014년 2월 26일
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?

답변 (1개)

Wayne King
Wayne King 2014년 2월 26일
편집: Wayne King 2014년 2월 26일
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()

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by