fips.CovarianceMatrix#
- class fips.CovarianceMatrix(data, name=None, index=None, columns=None, dtype=None, copy=None, sparse=False)[source]#
Represents a symmetric Covariance Matrix.
Covariance matrices are used to represent error covariances in the inversion framework. They can be constructed from variances and correlation matrices.
Attributes
Accessor for retrieving MatrixBlock instances from the Matrix.
Return the columns of the underlying DataFrame.
Return the index of the underlying data.
True if the internal DataFrame uses pandas sparse storage.
Return the shape of the underlying data.
Return values as numpy array or sparse matrix.
Returns the variances (diagonal elements) of the covariance matrix.
The underlying data, which must be numeric and non-NaN.
Name of the structure, used for error messages and block naming.
Methods
copy([deep])Create a copy of the structure.
force_symmetry([keep])Force the matrix to be perfectly symmetric by copying one triangle to the other.
from_file(path)Load object from a pickle file.
reindex(index[, columns, verify_overlap, ...])Return a new instance with data reindexed to the specified index and columns.
round_index(decimals[, axis, inplace])Round float indices on the specified axis to given decimals.
scale(factor)Scale the matrix by a scalar factor.
to_dense()Return a copy with dense internal storage.
to_file(path)Save object to a pickle file.
to_frame()Get the underlying DataFrame data.
to_numpy()Get the underlying data as a NumPy array.
to_sparse([threshold])Return a copy with sparse internal storage.
to_xarray()Convert to xarray (not implemented for base Matrix class).
xs(key[, axis, level, drop_level])Cross-select data based on index/column values.