declarative.cabal (2828B)
1 name: declarative 2 version: 0.5.4 3 synopsis: DIY Markov Chains. 4 homepage: http://github.com/jtobin/declarative 5 license: MIT 6 license-file: LICENSE 7 author: Jared Tobin 8 maintainer: jared@jtobin.ca 9 category: Math 10 build-type: Simple 11 tested-with: GHC == 8.2.2, GHC == 8.8.3, GHC == 8.10.4 12 cabal-version: >=1.10 13 description: 14 This package presents a simple combinator language for Markov transition 15 operators that are useful in MCMC. 16 . 17 Any transition operators sharing the same stationary distribution and obeying 18 the Markov and reversibility properties can be combined in a couple of ways, 19 such that the resulting operator preserves the stationary distribution and 20 desirable properties amenable for MCMC. 21 . 22 We can deterministically concatenate operators end-to-end, or sample from 23 a collection of them according to some probability distribution. See 24 <http://www.stat.umn.edu/geyer/f05/8931/n1998.pdf Geyer, 2005> for details. 25 . 26 A useful strategy is to hedge one's 'sampling risk' by occasionally 27 interleaving a computationally-expensive transition (such as a gradient-based 28 algorithm like Hamiltonian Monte Carlo or NUTS) with cheap Metropolis 29 transitions. 30 . 31 > transition = frequency [ 32 > (9, metropolis 1.0) 33 > , (1, hamiltonian 0.05 20) 34 > ] 35 . 36 Alternatively: sample consecutively using the same algorithm, but over a 37 range of different proposal distributions. 38 . 39 > transition = concatAllT [ 40 > slice 0.5 41 > , slice 1.0 42 > , slice 2.0 43 > ] 44 . 45 Or just mix and match and see what happens! 46 . 47 > transition = 48 > sampleT 49 > (sampleT (metropolis 0.5) (slice 0.1)) 50 > (sampleT (hamiltonian 0.01 20) (metropolis 2.0)) 51 . 52 Check the test suite for example usage. 53 54 Source-repository head 55 Type: git 56 Location: http://github.com/jtobin/declarative.git 57 58 library 59 default-language: Haskell2010 60 hs-source-dirs: lib 61 exposed-modules: 62 Numeric.MCMC 63 , Numeric.MCMC.Anneal 64 build-depends: 65 base >= 4 && < 6 66 , kan-extensions >= 5 && < 6 67 , mcmc-types >= 1.0.1 && < 2 68 , mwc-probability >= 2.0 && < 3 69 , mighty-metropolis >= 2.0 && < 3 70 , lens >= 4 && < 6 71 , primitive >= 0.6 && < 1.0 72 , pipes >= 4 && < 5 73 , hasty-hamiltonian >= 1.3 && < 2 74 , speedy-slice >= 0.1.5 && < 1 75 , transformers >= 0.5 && < 1.0 76 77 Test-suite rosenbrock 78 type: exitcode-stdio-1.0 79 hs-source-dirs: test 80 main-is: Rosenbrock.hs 81 default-language: Haskell2010 82 ghc-options: 83 -rtsopts 84 build-depends: 85 base >= 4 && < 6 86 , mwc-probability >= 2.0 && < 3 87 , declarative 88