I am studying PCA from Andrew Ng's Coursera courcecourse and other material to visualize high dimensional vectorsmaterials.
From In the Stanford NLP course cs224n's first assignmentfirst assignment, and in the lecture video from Andrew Ng.
They, they do SVD not Eigenvectorsingular value decomposition toinstead of eigenvector decomposition of covariance matrix, and heNg even says that SVD is numerically more stable than Eigeigendecomposition.
From my understanding, for PCA we should do SVD toof the data matrix(m,n) of (m,n)
size, not of the covariance matrix(n,n) of (n,n)
size. And eigenvector decomposition to covariance matrix.
Why do they do SVD to covariance matrix, not data matrix?
I even checked whether np.linalg.svd() is forof covariance matrix, but it was for data matrix.
What happened?Why do they do SVD of covariance matrix, not data matrix?