svd - what are the principal components?

2 ビュー (過去 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 Center および File ExchangeEigenvalues についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by