EmceeHammerMCMC

class pints.EmceeHammerMCMC(chains, x0, sigma0=None)[source]

Uses the differential evolution algorithm “emcee: the MCMC hammer”, described in Algorithm 2 in [1].

For k in 1:N:

  • Draw a walker X_j at random from the “complementary ensemble” (the group of chains not including k) without replacement.

  • Sample z ~ g(z), (see below).

  • Set Y = X_j(t) + z[X_k(t) - X_j(t)].

  • Set q = z^{d - 1} p(Y) / p(X_k(t)).

  • Sample r ~ U(0, 1).

  • If r <= q, set X_k(t + 1) equal to Y, if not use X_k(t).

Here, N is the number of chains (or walkers), d is the dimensionality of the space, and g(z) is proportional to 1 / sqrt(z) if z is in [1 / a, a] or to 0, otherwise (where a is a parameter with default value 2).

References

ask()[source]

See pints.MultiChainMCMC.ask().

current_log_pdfs()

Returns the log pdf values of the current points (i.e. of the most recent points returned by tell()).

in_initial_phase()

For methods that need an initial phase (see needs_initial_phase()), this method returns True if the method is currently configured to be in its initial phase. For other methods a NotImplementedError is returned.

n_hyper_parameters()[source]

See TunableMethod.n_hyper_parameters().

name()[source]

See pints.MCMCSampler.name().

needs_initial_phase()

Returns True if this method needs an initial phase, for example an adaptation-free period for adaptive covariance methods, or a warm-up phase for DREAM.

needs_sensitivities()

Returns True if this methods needs sensitivities to be passed in to tell along with the evaluated logpdf.

scale()[source]

Returns the scale coefficient a used in updating the position of the chains.

set_hyper_parameters(x)[source]

The hyper-parameter vector is [scale].

See TunableMethod.set_hyper_parameters().

set_initial_phase(in_initial_phase)

For methods that need an initial phase (see needs_initial_phase()), this method toggles the initial phase algorithm. For other methods a NotImplementedError is returned.

set_scale(scale)[source]

Sets the scale coefficient a used in updating the position of the chains.

tell(fx)[source]

See pints.MultiChainMCMC.tell().