lib.samples.profiles.ParamCovariance¶
- class lib.samples.profiles.ParamCovariance(covariance, parameters)¶
Bases:
cosmopipe.lib.utils.BaseClassClass that represents a parameter covariance. TODO: think about link with data_vector.CovarianceMatrix and mixing compressed data data vector covariance / parameter covariance, e.g. pre-recon + alpha?
Initialize
ParamCovariance.- Parameters
covariance (array) – 2D array holding covariance.
parameters (list, ParameterCollection) – Parameters corresponding to input
covariance.
Methods
Return shallow copy of
self.Return correlation matrix for input parameters
parameters.Return covariance matrix for input parameters
parameters.deepcopyInstantiate and initalize class with state dictionary.
Return inverse covariance matrix for input parameters
parameters.is_mpi_broadcastis_mpi_gatheredis_mpi_rootis_mpi_scatteredLoad class in numpy binary format from disk.
If different formats are possible, this method should between them based on file name extension.
log_criticallog_debuglog_errorlog_infolog_warningSave class to disk.
If different formats are possible, this method should between them based on file name extension.
Attributes
loggerMPI attributes
mpicommmpirootmpistate- copy()¶
Return shallow copy of
self.
- corrcoef(parameters=None)¶
Return correlation matrix for input parameters
parameters.
- cov(parameters=None)¶
Return covariance matrix for input parameters
parameters.
- classmethod from_state(state, mpiroot=0, mpicomm=None)¶
Instantiate and initalize class with state dictionary.
- invcov(parameters=None)¶
Return inverse covariance matrix for input parameters
parameters.
- classmethod load(filename, mpiroot=0, mpicomm=None)¶
Load class in numpy binary format from disk. If the loaded state contains
__class__and that exists incls._registry, return instance ofcls._registry[__class__](instead ofcls).
- load_auto(*args, **kwargs)¶
If different formats are possible, this method should between them based on file name extension.
- property mpiattrs¶
MPI attributes
- save(filename)¶
Save class to disk.
- save_auto(*args, **kwargs)¶
If different formats are possible, this method should between them based on file name extension.