pymc.step_methods.DEMetropolisZ#
- class pymc.step_methods.DEMetropolisZ(*args, **kwargs)[source]#
Adaptive Differential Evolution Metropolis sampling step that uses the past to inform jumps.
- Parameters:
- lamb: float
Lambda parameter of the DE proposal mechanism. Defaults to 2.38 / sqrt(2 * ndim)
- vars: list
List of variables for sampler
- S: standard deviation or covariance matrix
Some measure of variance to parameterize proposal distribution
- proposal_dist: function
Function that returns zero-mean deviates when parameterized with S (and n). Defaults to NormalProposal(S).
- scaling: scalar or array
Initial scale factor for epsilon. Defaults to 0.001
- tune: str
Which hyperparameter to tune. Defaults to ‘scaling’, but can also be ‘lambda’ or None.
- tune_interval: int
The frequency of tuning. Defaults to 100 iterations.
- tune_drop_fraction: float
Fraction of tuning steps that will be removed from the samplers history when the tuning ends. Defaults to 0.9 - keeping the last 10% of tuning steps for good mixing while removing 90% of potentially unconverged tuning positions.
- model: PyMC Model
Optional model for sampling step. Defaults to None (taken from context).
- mode: string or `Mode` instance.
compilation mode passed to PyTensor functions
References
[Braak2008]Cajo C.F. ter Braak (2008). Differential Evolution Markov Chain with snooker updater and fewer chains. Statistics and Computing link
Methods
DEMetropolisZ.__init__
([vars, S, ...])- Parameters:
Perform a single sample step in a raveled and concatenated parameter space.
DEMetropolisZ.competence
(var, has_grad)Resets the tuned sampler parameters and history to their initial values.
DEMetropolisZ.step
(point)Perform a single step of the sampler.
At the end of the tuning phase, this method removes the first x% of the history so future proposals are not informed by unconverged tuning iterations.
Attributes
default_blocked
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.