flat-mcmc: Painless general-purpose sampling.

[ library, math, mit ] [ Propose Tags ]

In general this sampler is useful when you want decent performance without dealing with any tuning parameters or local proposal distributions.

import Numeric.MCMC.Flat
import Data.Vector (Vector, toList, fromList)

rosenbrock :: Vector Double -> Double
rosenbrock xs = negate (5  *(x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2) where
  [x0, x1] = toList xs

ensemble :: Ensemble
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]
  ]

main :: IO ()
main = withSystemRandom . asGenIO $ mcmc 12500 ensemble rosenbrock
Versions [faq] 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, 1.5.1, 1.5.2
Dependencies base (<5), mcmc-types (>=1.0.1 && <2), monad-par, monad-par-extras, mwc-probability (>=1.0.1 && <2), pipes (==4.*), primitive, transformers, vector [details]
License MIT
Author Jared Tobin
Maintainer jared@jtobin.ca
Category Math
Home page http://jtobin.github.com/flat-mcmc
Source repo head: git clone http://github.com/jtobin/flat-mcmc.git
Uploaded by JaredTobin at 2016-04-06T13:34:10Z
Distributions LTSHaskell:1.5.0, NixOS:1.5.2, Stackage:1.5.0
Downloads 6950 total (19 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2016-04-06 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees