laplace_posterior_approximation_for_linear_models

pyapprox.bayes.laplace_posterior_approximation_for_linear_models(linear_matrix, prior_mean, prior_hessian, noise_covariance_inv, obs, bvec=None)[source]

Compute the mean and covariance of the Laplace posterior of a linear model with a Gaussian prior

Given some data d and a linear forward model, A(x) = Ax+b, and a Gaussian likelihood and a Gaussian prior, the resulting posterior is always Gaussian.

Parameters:
linear_matrix(num_qoi, num_dims) matrix

The matrix reprsenting the linear forward model.

prior_mean(num_dims, 1) vector

The mean of the Gaussian prior

prior_hessian: (num_dims, num_dims) matrix

The Hessian (inverse of the covariance) of the Gaussian prior

noise_covariance_inv(num_qoi, num_qoi) matrix

The inverse of the covariance of the osbervational noise

obs(num_qoi, 1) vector

The observations

bvecnp.ndarray(num_qoi)

The deterministic shift of the linear model

Returns:
posterior_mean(num_dims, 1) vector

The mean of the Gaussian posterior

posterior_covariance: (num_dims, num_dims) matrix

The covariance of the Gaussian posterior