edit

AffineInvariantMCMC.jl

Module AffineInvariantMCMC.jl provides functions for Bayesian sampling using Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler (aka Emcee) based on a paper by Goodman & Weare, "Ensemble samplers with affine invariance" Communications in Applied Mathematics and Computational Science, DOI: 10.2140/camcos.2010.5.65, 2010.

AffineInvariantMCMC.jl module functions:

# AffineInvariantMCMC.flattenmcmcarrayMethod.

Flatten MCMC arrays

source

# AffineInvariantMCMC.sampleFunction.

Bayesian sampling using Goodman & Weare's Affine Invariant Markov chain Monte Carlo (MCMC) Ensemble sampler (aka Emcee)

AffineInvariantMCMC.sample(llhood, numwalkers=10, numsamples_perwalker=100, thinning=1)

Arguments:

  • llhood : function estimating loglikelihood (for example, generated using Mads.makearrayloglikelihood())
  • numwalkers : number of walkers
  • x0 : normalized initial parameters (matrix of size (length(params), numwalkers))
  • thinning : removal of any thinning realization
  • a :

Returns:

  • mcmcchain : final MCMC chain
  • llhoodvals : log likelihoods of the final samples in the chain

Reference:

Goodman, Jonathan, and Jonathan Weare. "Ensemble samplers with affine invariance." Communications in applied mathematics and computational science 5.1 (2010): 65-80.

source