pystra.correlation.CorrelationMatrix#

class CorrelationMatrix(matrix=None)[source]#

Bases: object

Physical-space correlation matrix wrapper.

A thin wrapper around a NumPy array that stores the correlation matrix of \(n\) random variables \(X_1, \dots, X_n\). The \((i, j)\) entry is \(\text{corr}(X_i, X_j)\).

Supports element access via [] so it can be used interchangeably with a plain NumPy array in most contexts.

Parameters:

matrix (array_like, optional) – Symmetric correlation matrix. Must have ones on the diagonal and all eigenvalues positive (positive definite).

Methods

getMatrix

Return the correlation matrix as a NumPy array.

getMatrix()[source]#

Return the correlation matrix as a NumPy array.

Returns:

The correlation matrix.

Return type:

ndarray