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 objectiveobs_uncertainty (
float
) – Fractional, relative (1 sigma) uncertainty in observationsrepres_uncertainty (
float
) – Fractional, relative (1 sigma) uncertainty due to the spatial and temporal representitiveness of the observationsinterann_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 observationsabs_repres_uncertainty (
float
) – Fractional, absolute (1 sigma) uncertainty due to the spatial and temporal representitiveness of the observationsabs_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
model (
esem.emulator.Emulator
)
sample
([prior_x, n_samples, kernel_kwargs, …])This is the call that does the actual inference.