cofi.utils

cofi.utils#

Utility classes and functions (e.g. to generate regularization terms and more)

The class inheritance of regularization classes:

graph TD; BaseRegularization --> LpNormRegularization; LpNormRegularization --> QuadraticReg; BaseRegularization --> ModelCovariance; ModelCovariance --> GaussianPrior;

Classes

cofi.utils.BaseRegularization()

Base class for a regularization term

cofi.utils.GaussianPrior(...)

CoFI's utility class to calculate the Gaussian prior, given the inverse of model covariance matrix and the mean model

cofi.utils.InversionPool(...[, callback, ...])

This class manages an ensemble of inversions and allows them to be run in parallel or sequentially.

cofi.utils.LpNormRegularization([p, ...])

CoFI's utility class to calculate Lp-norm regularization, given the p value (default to 2), an optional weighting matrix and an optional reference value

cofi.utils.ModelCovariance()

CoFI's utility abstract class to calculate model prior distribution

cofi.utils.QuadraticReg([weighting_matrix, ...])

CoFI's utility class to calculate weighted L2 norm regularization with an optional reference model