fips.estimators.BayesianSolver#

class fips.estimators.BayesianSolver(z, x_0, H, S_0, S_z, c=None, gamma=1.0)[source]#

Bases: Estimator

Bayesian inversion estimator class.

This class implements a Bayesian inversion framework for solving inverse problems, also known as the batch method.

The regularization factor (gamma) controls the balance between fitting observations and staying close to the prior. In the cost function, gamma (γ) multiplies the observation term: J(x) = (x - x_0)^T S_0^{-1} (x - x_0) + gamma*(z - Hx)^T S_z^{-1} (z - Hx)

This amounts to scaling S_z by 1/gamma.

  • gamma > 1: Increases weight on data fitting (less regularization, fits observations more closely)

  • gamma = 1: Standard Bayesian inversion (default)

  • gamma < 1: Decreases weight on data fitting (more regularization, stays closer to prior)

Parameters:
  • z (np.ndarray) – Observed data

  • x_0 (np.ndarray) – Prior model estimate

  • H (np.ndarray) – Forward operator

  • S_0 (np.ndarray) – Prior error covariance

  • S_z (np.ndarray) – Model-data mismatch covariance

  • c (np.ndarray | float, optional) – Constant data, defaults to 0.0

  • gamma (float, optional) – Regularization factor (γ) that multiplies the observation term in the cost function, by default 1.0

Attributes

gamma

Regularization factor (γ) that multiplies the observation term in the cost function.

S_hat

Posterior Error Covariance Matrix with regularization.

x_hat

Posterior Mean Model Estimate (solution).

Methods

cost(x)

Cost function with regularization.

Inherited

From Estimator: A, c, desroziers, DOFS, forward, H, K, leverage, n_x, n_z, R2, reduced_chi2, residual, RMSE, S_0, S_y0, S_z, U_red, uncertainty_reduction, x_0, y_0, y_hat, z