scipy.stats.

Covariance#

class scipy.stats.Covariance[source]#

Representation of a covariance matrix

Calculations involving covariance matrices (e.g. data whitening, multivariate normal function evaluation) are often performed more efficiently using a decomposition of the covariance matrix instead of the covariance matrix itself. This class allows the user to construct an object representing a covariance matrix using any of several decompositions and perform calculations using a common interface.

Note

The Covariance class cannot be instantiated directly. Instead, use one of the factory methods (e.g. Covariance.from_diagonal).

Attributes:
covariance

Explicit representation of the covariance matrix

log_pdet

Log of the pseudo-determinant of the covariance matrix