-3

I really don't know why, when i computed the eigenvalues with PCA from my dataset i obtain a vector which have values in different order respect of SVD

This is the result

This is the code

Thanks for help!!!

Zephyr
  • 11,891
  • 53
  • 45
  • 80
FraMan
  • 27
  • 8
  • Please provide more context/background information, and please do not post screenshots of your code (paste and format the actual code instead). Also, this question as a whole might be better suited to [Data Science Stack Exchange](https://datascience.stackexchange.com/). – laptou Dec 23 '18 at 23:04

1 Answers1

0

Your PCA is incomplete when you use np.linalg.eig because after eigen-decomposition you have to reorder the terms so the eigenvalues in the diagonal matrix are in descending order (this is not part of the eigen-decomposition itself). Furthermore, the eig docs do not guarantee any order in your results, whereas the SVD docs explicitly state that your values are returned in descending order.

Canas
  • 31
  • 3