gemlib.mcmc.MwgStep

Contents

gemlib.mcmc.MwgStep#

class gemlib.mcmc.MwgStep(sampling_algorithm, target_names, kernel_kwargs_fn=<function MwgStep.<lambda>>)#

A Metropolis-within-Gibbs step.

Transforms a base kernel to operate on a substate of a Markov chain.

Parameters:
  • sampling_algorithm (SamplingAlgorithm) – a named tuple containing the generic kernel init and step function.

  • target_names (str | list[str]) – a list of variable names on which the Metropolis-within-Gibbs step is to operate

  • kernel_kwargs_fn (Callable[[Position], dict]) – a callable taking the chain position as an argument, and returning a dictionary of extra kwargs to sampling_algorithm.step.

Returns:

An instance of SamplingAlgorithm.

__init__()#

Methods