The pseudoinverse of a covariance matrix #
Matrix.covariancePseudoInverse inverts the nonzero eigenvalues of a real positive-semidefinite
matrix and vanishes on its kernel. Invalid covariance matrices give zero. This is the inverse
needed to condition a Gaussian vector on an observed block with singular covariance.
The construction uses Mathlib's finite-spectrum continuous functional calculus. Its Euclidean
operator is the existing LinearMap.moorePenroseInverse, so uniqueness follows from the four
Penrose equations rather than a choice of eigenbasis.
References #
- R. Penrose, A generalized inverse for matrices, Proc. Cambridge Philos. Soc. 51 (1955), 406–413.
- T. W. Anderson, An Introduction to Multivariate Statistical Analysis, 3rd ed., Wiley (2003).
Invert the nonzero eigenvalues of a positive-semidefinite covariance matrix, sending zero eigenvalues to zero. For a matrix that is not positive semidefinite, return zero.
Instances For
The positive-semidefinite branch of the covariance pseudoinverse.
An invalid covariance has zero pseudoinverse.
The pseudoinverse of zero is zero, also in dimension zero.
Every covariance pseudoinverse is positive semidefinite, including the invalid branch.
A covariance matrix commutes with its pseudoinverse.
The first Penrose equation for a positive-semidefinite matrix.
The second Penrose equation holds for every matrix, including invalid covariances.
The product of a covariance and its pseudoinverse is symmetric.
The product of a covariance pseudoinverse and its covariance is symmetric.
The functional-calculus construction satisfies all four Moore–Penrose equations.
The four matrix Penrose equations characterize the covariance pseudoinverse.
The covariance construction agrees with the existing Moore–Penrose inverse of the Euclidean operator.
At positive-definite covariance, the pseudoinverse is the ordinary inverse.
On one coordinate, the pseudoinverse of a valid covariance agrees with the totalized ordinary inverse, including zero variance.
Inverting the covariance pseudoinverse recovers every valid covariance.
Multiplication by a covariance and its pseudoinverse is the orthogonal projection onto
its Euclidean range. Submodule.starProjection is the ambient inclusion composed with
Submodule.orthogonalProjectionOnto.
Multiplication by a covariance pseudoinverse and its covariance is the orthogonal projection onto the covariance's Euclidean range.
The covariance pseudoinverse is the limit of (C² + ε I)⁻¹ C as positive ε tends to zero.
The limit includes zero covariance and empty coordinate types.
The totalized covariance pseudoinverse is Borel measurable in all matrix entries.