Differential Evolution MCMC

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

Uses differential evolution MCMC as described in [1] to perform posterior sampling from the posterior.

In each step of the algorithm n chains are evolved using the evolution equation:

x_proposed = x[i,r] + gamma * (X[i,r1] - x[i,r2]) + epsilon

where r1 and r2 are random chain indices chosen (without replacement) from the n available chains, which must not equal i or each other, where i indicates the current time step, and epsilon ~ N(0,b) where d is the dimensionality of the parameter vector.

If x_proposed / x[i,r] > u ~ U(0,1), then x[i+1,r] = x_proposed; otherwise, x[i+1,r] = x[i].

Extends MultiChainMCMC.

Note

This sampler requires a number of chains \(n \ge 3\), and recommends \(n \ge 1.5 d\).

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()).

gamma()[source]

Returns the coefficient gamma used in updating the position of each chain.

gamma_switch_rate()[source]

Returns the number of steps between iterations where gamma is set to 1 (then reset immediately afterwards).

gaussian_error()[source]

Returns whether a Gaussian versus uniform error process is used.

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.

relative_scaling()[source]

Returns whether an error process whose standard deviation scales relatively is used (False indicates absolute scale).

scale_coefficient()[source]

Sets the scale coefficient b of the error process used in updating the position of each chain.

set_gamma(gamma)[source]

Sets the coefficient gamma used in updating the position of each chain.

set_gamma_switch_rate(gamma_switch_rate)[source]

Sets the number of steps between iterations where gamma is set to 1 (then reset immediately afterwards).

set_gaussian_error(gaussian_error)[source]

If True sets the error process to be a gaussian error, N(0, b*); if False, it uses a uniform error U(-b*, b*); where b* = b if absolute scaling used and b* = mu * b if relative scaling is used instead.

set_hyper_parameters(x)[source]

The hyper-parameter vector is [gamma, gaussian_scale_coefficient, gamma_switch_rate, gaussian_error, relative_scaling].

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_relative_scaling(relative_scaling)[source]

Sets whether to use an error process whose standard deviation scales relatively (scale = self._mu * self_b) or absolutely (scale = self._b in all dimensions).

set_scale_coefficient(b)[source]

Sets the scale coefficient b of the error process used in updating the position of each chain.

tell(proposed_log_pdfs)[source]

See pints.MultiChainMCMC.tell().