pymc.step_methods.BinaryMetropolis#
- class pymc.step_methods.BinaryMetropolis(*args, **kwargs)[source]#
Metropolis-Hastings optimized for binary variables
- Parameters:
- vars: list
List of value variables for sampler
- scaling: scalar or array
Initial scale factor for proposal. Defaults to 1.
- tune: bool
Flag for tuning. Defaults to True.
- tune_interval: int
The frequency of tuning. Defaults to 100 iterations.
- model: PyMC Model
Optional model for sampling step. Defaults to None (taken from context).
Methods
BinaryMetropolis.__init__
(vars[, scaling, ...])BinaryMetropolis.astep
(apoint, *args)Perform a single sample step in a raveled and concatenated parameter space.
BinaryMetropolis is only suitable for binary (bool) and Categorical variables with k=1.
BinaryMetropolis.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.