bilby.core.sampler.dynesty_utils.propose_differetial_evolution

bilby.core.sampler.dynesty_utils.propose_differetial_evolution(u, live, n, n_cluster, rstate, mix=0.5, scale=1)[source]

Propose a new point using ensemble differential evolution (ter Braak + (2006)).

\[u_{\rm prop} = u + \gamma (v_{a} - v_{b})\]

We consider two choices for \(\gamma\): weighted by mix.

  • \(\gamma = 1\): this is a mode-hopping mode for efficiently exploring multi-modal spaces

  • \(\gamma \sim \Gamma\left(\gamma; k=4, \theta=\frac{\kappa}{4}\right)\)

Here \(\kappa = 2.38 / \sqrt{2 n}\) unless specified by the user and we scale by a random draw from a Gamma distribution. The specific distribution was chosen somewhat arbitrarily to have mean and mode close to \(\kappa\) and give good acceptance and autocorrelation times on a subset of problems.

Parameters:
u: np.ndarray

The current point.

live: np.ndarray

The ensemble of live points to select \(v\) from.

n: int

The number of dimensions being explored

n_cluster: int

The number of dimensions to run the differential evolution over, the first n_cluster dimensions are used. The rest are randomly sampled from the prior.

rstate: np.random.RandomState

The random state to use to generate random numbers.

mix: float

The fraction of proposed points that should follow the specified scale rather than mode hopping. default=0.5

scale: float

The amount to scale the difference vector by. default = 2.38 / (2 * n_cluster)**0.5)

Returns:
u_prop: np.ndarray

The proposed point.