flat-mcmc

Painless, efficient, general-purpose sampling from continuous distributions.
Log | Files | Refs | README | LICENSE

commit f530ba6e4dcd78e8ba7bbabfe46fe4ebb5b732e8
parent 69efdcdeb47cec6b0cf9813b025b704f3b680d8e
Author: Jared Tobin <jared@jtobin.ca>
Date:   Thu, 15 Oct 2015 22:22:06 +1300

Some updates that were lying around.

Diffstat:
M.gitignore | 3++-
Mflat-mcmc.cabal | 2++
Msrc/Numeric/MCMC/Flat.hs | 1+
Astack.yaml | 6++++++
Mtest/Tests.hs | 3+--
5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -18,4 +18,5 @@ demos/SPDE_Flat sandbox .cabal-sandbox cabal.sandbox.config - +.stack-work +debug diff --git a/flat-mcmc.cabal b/flat-mcmc.cabal @@ -12,6 +12,8 @@ cabal-version: >=1.8 description: Painless general-purpose sampling. + . + Implements a Markov chain transition operator as a state monad. Source-repository head Type: git diff --git a/src/Numeric/MCMC/Flat.hs b/src/Numeric/MCMC/Flat.hs @@ -7,6 +7,7 @@ module Numeric.MCMC.Flat ( , Ensemble , Density , flat + , flatGranular -- * System.Random.MWC , sample , withSystemRandom diff --git a/stack.yaml b/stack.yaml @@ -0,0 +1,6 @@ +flags: {} +packages: + - '.' +extra-deps: + - mwc-probability-1.0.2 +resolver: lts-3.8 diff --git a/test/Tests.hs b/test/Tests.hs @@ -7,7 +7,6 @@ import Control.Monad.State.Strict import qualified Data.Vector as V import qualified Data.Vector.Unboxed as U import Numeric.MCMC.Flat -import System.Random.MWC.Probability lRosenbrock :: Density lRosenbrock xs = @@ -32,6 +31,6 @@ origin = Chain { -- cabal test --show-details=streaming main :: IO () main = withSystemRandom . asGenIO $ \g -> do - trace <- sample (replicateM 5000 (flat opts) `evalStateT` origin) g + trace <- sample (replicateM 5000 (flatGranular opts) `evalStateT` origin) g print trace