How to find the eigenvector associated with the highest eigenvalues.

I ran PCA on a matrix and now I am asked to find the eigenvector associated to the highest eigenvalues.
How can it be done? Is the first eigenvetor in score the one associated with the higest eigenvalues?

 採用された回答

Matt J
Matt J 2022 年 5 月 29 日

1 投票

No, the output of eig() is not sorted, but the output of svd() is.

3 件のコメント

Nicola Dall'Osto
Nicola Dall'Osto 2022 年 5 月 29 日
So you are confirming that PCA returns sorted scores (eigenvectros)?
Matt J
Matt J 2022 年 5 月 29 日
編集済み: Matt J 2022 年 5 月 29 日
It depends what code you have used to perform the PCA. svd() does return sorted singular values
Nicola Dall'Osto
Nicola Dall'Osto 2022 年 5 月 29 日
I used pca function. It uses SVD algorithm by default.

サインインしてコメントする。

その他の回答 (1 件)

Torsten
Torsten 2022 年 5 月 29 日
編集済み: Torsten 2022 年 5 月 29 日

0 投票

Why not just trying whether A*x equals lambda_max*x within a certain tolerance ?

カテゴリ

ヘルプ センター および File ExchangeLinear Algebra についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 5 月 29 日

編集済み:

2022 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by