pymc.step_methods.BinaryGibbsMetropolis#
- class pymc.step_methods.BinaryGibbsMetropolis(*args, **kwargs)[source]#
A Metropolis-within-Gibbs step method optimized for binary variables
- Parameters:
- vars: list
List of value variables for sampler
- order: list or ‘random’
List of integers indicating the Gibbs update order e.g., [0, 2, 1, …]. Default is random
- transit_p: float
The diagonal of the transition kernel. A value > .5 gives anticorrelated proposals, which resulting in more efficient antithetical sampling. Default is 0.8
- model: PyMC Model
Optional model for sampling step. Defaults to None (taken from context).
Methods
BinaryGibbsMetropolis.__init__
(vars[, ...])BinaryGibbsMetropolis.astep
(apoint, *args)Perform a single sample step in a raveled and concatenated parameter space.
BinaryMetropolis is only suitable for Bernoulli and Categorical variables with k=2.
BinaryGibbsMetropolis.step
(point)Perform a single step of the sampler.
Attributes
name
stats_dtypes
A list containing <=1 dictionary that maps stat names to dtypes.
stats_dtypes_shapes
Maps stat names to dtypes and shapes.
vars
Variables that the step method is assigned to.