esem.sampler.MCMCSampler

class esem.sampler.MCMCSampler(model, obs, **kwargs)

Sample from the posterior using the TensorFlow Markov-Chain Monte-Carlo (MCMC) sampling tools. It uses a HamiltonianMonteCarlo kernel.

Notes

Note that NaN observations will create ill-defined likelihoods.

__init__(model, obs, **kwargs)
Parameters
  • model (esem.emulator.Emulator)

  • obs (iris.cube.Cube or array-like) – The objective

  • obs_uncertainty (float) – Fractional, relative (1 sigma) uncertainty in observations

  • repres_uncertainty (float) – Fractional, relative (1 sigma) uncertainty due to the spatial and temporal representitiveness of the observations

  • interann_uncertainty (float) – Fractional, relative (1 sigma) uncertainty introduced when using a model run for a year other than that the observations were measured in.

  • struct_uncertainty (float) – Fractional, relative (1 sigma) uncertainty in the model itself.

  • abs_obs_uncertainty (float) – Fractional, absolute (1 sigma) uncertainty in observations

  • abs_repres_uncertainty (float) – Fractional, absolute (1 sigma) uncertainty due to the spatial and temporal representitiveness of the observations

  • abs_interann_uncertainty (float) – Fractional, absolute (1 sigma) uncertainty introduced when using a model run for a year other than that the observations were measured in.

  • abs_struct_uncertainty (float) – Fractional, absolute (1 sigma) uncertainty in the model itself.

Methods

__init__(model, obs, **kwargs)

Parameters

sample([prior_x, n_samples, kernel_kwargs, …])

This is the call that does the actual inference.