Why prefer eigh for a real symmetric covariance matrix?
MathematicsLevel: IntermediateRank and spectral numerics
Why prefer eigh for a real symmetric covariance matrix?
Hints
- Covariance is symmetric.
- Use the structured solver.
Answer
It exploits symmetry and returns real eigenvalues with orthonormal eigenvectors. A general eigensolver does not use that specialized structure.
Source and licence: NumPy — numerical linear algebra · BSD-3-Clause · answer: Quantoros editorial