gemlib.mcmc.SamplingAlgorithm

gemlib.mcmc.SamplingAlgorithm#

class gemlib.mcmc.SamplingAlgorithm(init_fn, step_fn)#

Represent a sampling algorithm

__init__(init_fn, step_fn)#

Create a new sampling algorithm

Parameters:
  • init_fn (KernelInitFnType | KernelInitMonad) – the kernel initialisation function

  • step_fn (KernelStepFnType | KernelStepMonad) – the kernel step function

Methods

__init__(init_fn, step_fn)

Create a new sampling algorithm

init(target_log_density_fn, ...)

Initialize and MCMC chain

step(target_log_density_fn, ...)

Function to invoke the MCMC kernel

then(next_kernel)

Sequential combinator