Struct emcee::EnsembleSampler [] [src]

pub struct EnsembleSampler<'a, T: Prob + 'a> {
    pub thin: usize,
    // some fields omitted
}

Affine-invariant Markov-chain Monte Carlo sampler

Fields

Thin the stored chains by this much

Methods

impl<'a, T: Prob + 'a> EnsembleSampler<'a, T>
[src]

Create a new EnsembleSampler

Errors are handled by returning a Result which contains EmceeError::InvalidInputs error variant for the following errors:

  • the number of walkers must be even * the number of walkers must be at least twice the number of parameters

Swap the built in random number generator for a seedable one

This means the random number generation can be reproducable. Seed is whatever SeedableRng.from_seed accepts.

Run the sampler with a callback called on each iteration

On each iteration, this function is called with an instance of Step in the new proposal position. The callback is passed as mutable so it can interact with state from the calling site.

Run the sampling

This runs the sampler for niterations iterations. Errors are signalled by the function returning a Result

Set the initial state of the sampler

Return the samples as computed by the sampler

Return the number of iterations accepted, one value per walker

Return the sampler to its default state