Covariance Matrices#
Covariance matrices are used in FIPS to represent uncertainty in the data provided to the inverse problem.
CovarianceMatrix#
Constructor#
|
Represents a symmetric Covariance Matrix. |
Attributes and underlying data#
Name of the structure, used for error messages and block naming. |
|
The underlying data, which must be numeric and non-NaN. |
|
Return the index of the underlying data. |
|
Return the columns of the underlying DataFrame. |
|
Return the shape of the underlying data. |
|
Return values as numpy array or sparse matrix. |
|
Returns the variances (diagonal elements) of the covariance matrix. |
|
Accessor for retrieving MatrixBlock instances from the Matrix. |
Conversion#
|
Create a copy of the structure. |
Get the underlying DataFrame data. |
|
Get the underlying data as a NumPy array. |
Reindexing / selection / label manipulation#
|
Cross-select data based on index/column values. |
|
Return a new instance with data reindexed to the specified index and columns. |
|
Round float indices on the specified axis to given decimals. |
Serialization#
Load object from a pickle file. |
|
|
Save object to a pickle file. |
Sparse support#
True if the internal DataFrame uses pandas sparse storage. |
|
|
Return a copy with sparse internal storage. |
Return a copy with dense internal storage. |
Computations#
|
Force the matrix to be perfectly symmetric by copying one triangle to the other. |
ErrorComponents#
|
Abstract base class for error components in covariance matrices. |
|
Error component that produces diagonal covariance matrices. |
|
Error component with block-structured correlation decay. |
|
Builds a full covariance matrix for a strict grid. |
Build covariance matrix#
|
Must return a pd.DataFrame with the given index on both rows and columns. |
Binary operations#
|
Add error components to create a CovarianceBuilder. |
CovarianceBuilder#
Constructor#
|
Builds covariance matrices by combining multiple error components. |
Build covariance matrix#
|
Build and sum all error components into a single DataFrame. |
Binary operations#
|
Add error components or builders together. |
|
Right-hand addition for error components. |