Finding Principal components from eigen vector matrix

1 回表示 (過去 30 日間)
Rashan shrestha
Rashan shrestha 2018 年 10 月 20 日
編集済み: KALYAN ACHARJYA 2018 年 10 月 20 日
I am using the following code to find the principal components train_set=xlsread('xdata.xlsx'); coef=pca(train_set); c=cov(coef); [V,D]=eig(c); here train_set is 100x6 data matrix and coef is 6x6 matrix c is also 6x6 matrix v is also a 6x6 matrix which is the eigen vector and D is the diagonal eigen value matrix.
I am trying to find the 6 principal components and I cannot seem to find how? I know I am supposed to find the greatest eigen vector corresponding to the eigen value as my first principal component. I would appreciate if somebody could help me with this.

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 10 月 20 日
編集済み: KALYAN ACHARJYA 2018 年 10 月 20 日

There are multiple answers related to your question.

Have you checked here.

From the last part, you can follow the steps to finding the PCA components from eig.

% dd are the eigenvalue for both L=dbx'*dbx and C=dbx*dbx';
[vv dd]=eig(L);

カテゴリ

Help Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by