In Matlab, while trying to do PCA, is there a difference when using the princomp command for positive vs. negative data values? Is it a non-negative definite command? Thank you!
Asked
Active
Viewed 241 times
1 Answers
0
The condition of non-negative defininiteness in PCA does not refer to the data (that wouldn't make sense) but to the covariance matrix estimated from the data. princomp
estimates the covariance matrix internally from your data, and such an estimate is always guaranteed to be non-negative definite, no matter what you data look like.

A. Donda
- 8,381
- 2
- 20
- 49
-
1You can use prcomp(), that uses SVD, instead of princomp(), that uses eigenvalues of the covariance matrix – Carlos AG Aug 19 '18 at 14:51