Samplers#

Sampler classes and associated methods.

The classes in this module provide different sampling algorithms to appraise distributions. All of them are designed to work in a minimal way; you can run the sampling method with only a target distribution and filename to write your samples to. However, the true power of any algorithm only shows when the user injects his expertise through tuning parameters.

Sampling can be initialised from an instance of a sampler:

from hmclab import HMC

HMC_instance = HMC()

# Sampling using the instance method
HMC_instance.sample(distribution, "samples.h5")

All of the classes inherit from _AbstractSampler; a base class outlining required methods and their signatures (required in- and outputs).

Available classes within Samplers:

_AbstractSampler

Abstract base class for Markov chain Monte Carlo samplers.

RWMH

HMC