cuqi.testproblem.Abel1D.sample_posterior#

Abel1D.sample_posterior(Ns, Nb=None, callback=None, experimental=False)#

Sample the posterior. Sampler choice and tuning is handled automatically.

Parameters:
  • Ns (int) – Number of samples to draw.

  • Nb (int or None, Optional) – Number of burn-in samples. If not provided, 20% of the samples will be used for burn-in.

  • callback (callable, Optional) – If set this function will be called after every sample. The signature of the callback function is callback(sample, sample_index), where sample is the current sample and sample_index is the index of the sample. An example is shown in demos/demo31_callback.py.

  • experimental (bool, Optional) – If set to True, the sampler selection will use the samplers from the cuqi.experimental.mcmc module.

Returns:

samples – Samples from the posterior.

Return type:

cuqi.samples.Samples