flat-mcmc: Painless general-purpose sampling.
flat-mcmc is a Haskell library for painless, efficient, general-purpose sampling from continuous distributions.
flat-mcmc uses an ensemble sampler that is invariant to affine transformations of space. It wanders a target probability distribution's parameter space as if it had been "flattened" or "unstretched" in some sense, allowing many particles to explore it locally and in parallel.
In general this sampler is useful when you want decent performance without dealing with any tuning parameters or local proposal distributions.
flat-mcmc exports an
mcmc function that prints a trace to stdout, as well
flat transition operator that can be used more generally.
import Numeric.MCMC.Flat import qualified Data.Vector.Unboxed as U (unsafeIndex) rosenbrock :: Particle -> Double rosenbrock xs = negate (5 * (x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2) where x0 = U.unsafeIndex xs 0 x1 = U.unsafeIndex xs 1 origin :: Ensemble origin = ensemble [ particle [negate 1.0, negate 1.0] , particle [negate 1.0, 1.0] , particle [1.0, negate 1.0] , particle [1.0, 1.0] ] main :: IO () main = withSystemRandom . asGenIO $ mcmc 12500 origin rosenbrock
|Versions||0.1.0.0, 1.0.0, 1.0.1, 1.1.1, 1.2.1, 1.2.2, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.5.0|
|Dependencies||base (>4 && <6), formatting (==6.*), mcmc-types (>=1.0.1 && <2), monad-par (>=0.3.4.7 && <1), monad-par-extras (>=0.3.3 && <1), mwc-probability (>=1.0.1 && <3), pipes (==4.*), primitive (>=0.6 && <1), text (>=1.2 && <2), transformers (>=0.2 && <0.6), vector (>=0.10 && <1) [details]|
|Revised||Revision 1 made by JaredTobin at Fri Feb 2 04:19:59 UTC 2018|
|Source repo||head: git clone http://github.com/jtobin/flat-mcmc.git|
|Uploaded||by JaredTobin at Mon Dec 19 19:06:53 UTC 2016|
|Distributions||LTSHaskell:1.5.0, NixOS:1.5.0, Stackage:1.5.0|
|Downloads||2750 total (39 in the last 30 days)|
|Rating||(no votes yet) [estimated by rule of succession]|
|Status||Docs available [build log]
Last success reported on 2016-12-19 [all 1 reports]
Hackage Matrix CI
- flat-mcmc-1.5.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
For package maintainers and hackage trustees