pymc.DEMetropolisZ#

class pymc.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 Uniform(-S,+S).

scaling: scalar or array

Initial scale factor for epsilon. Defaults to 0.001

tune: str

Which hyperparameter to tune. Defaults to ‘lambda’, but can also be ‘scaling’ 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 Aesara functions

References

Braak2006

Cajo C.F. ter Braak (2006). Differential Evolution Markov Chain with snooker updater and fewer chains. Statistics and Computing link

Methods

DEMetropolisZ.__init__([vars, S, ...])

Parameters

DEMetropolisZ.astep(q0)

DEMetropolisZ.competence(var, has_grad)

DEMetropolisZ.reset_tuning()

Resets the tuned sampler parameters and history to their initial values.

DEMetropolisZ.step(point)

Perform a single step of the sampler.

DEMetropolisZ.stop_tuning()

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

generates_stats

name

stats_dtypes

vars