(c) 2016 Jared TobinMITJared Tobin <jared@jtobin.ca>unstableghcNoneThe M transition operator for driving a Markov chain over a space of ensembles.Trace n8 iterations of a Markov chain and stream them to stdout.Note that the Markov chain is defined over the space of ensembles, so you'll need to provide an ensemble of particles for the start location.import Numeric.MCMC.Flat-import Data.Vector (Vector, toList, fromList):{Hlet rosenbrock xs = negate (5 *(x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2)& where [x0, x1] = toList xs:}:{let ensemble = fromList [!fromList [negate 1.0, negate 1.0], fromList [negate 1.0, 1.0], fromList [1.0, negate 1.0], fromList [1.0, 1.0]]:}7withSystemRandom . asGenIO $ mcmc 2 ensemble rosenbrock -1.0,-1.0-1.0,1.01.0,-1.0%0.7049046915549257,0.7049046915549257%-0.843493377618159,-0.843493377618159&-1.1655594505975082,1.1655594505975082&0.5466534497342876,-0.9615123448709006%0.7049046915549257,0.7049046915549257          flatm_HnQr3NI82Cc5h8xsvkhpIpNumeric.MCMC.Flatmwcra_0lrQ1SkkNA85sa8eZ98xQkSystem.Random.MWCasGenIOcreatewithSystemRandomcreateSystemRandomEnsembleParticleChainflatmcmc chainTarget chainPosition symmetricstretch acceptProbmoveexecutechain parMapChunk $fShowChainmcmct_C5xQ0NX1wqLK6BdaB0uD6AData.Sampling.Types TransitionglTargetlTargetTarget