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
kin1:N:Draw a walker
X_jat random from the “complementary ensemble” (the group of chains not includingk) 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, setX_k(t + 1)equal toY, if not useX_k(t).
Here,
Nis the number of chains (or walkers),dis the dimensionality of the space, andg(z)is proportional to1 / sqrt(z)ifzis in[1 / a, a]or to 0, otherwise (whereais a parameter with default value2).Extends
MultiChainMCMC, does not use sensitivities.References
- 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 returnsTrueif the method is currently configured to be in its initial phase. For other methods aNotImplementedErroris returned.
- needs_initial_phase()¶
Returns
Trueif 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
Trueif this methods needs sensitivities to be passed in totellalong with the evaluated logpdf.
- 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 aNotImplementedErroris returned.