mighty-metropolis.cabal (2526B)
1 name: mighty-metropolis 2 version: 2.0.0 3 synopsis: The Metropolis algorithm. 4 homepage: http://github.com/jtobin/mighty-metropolis 5 license: MIT 6 license-file: LICENSE 7 author: Jared Tobin 8 maintainer: jared@jtobin.ca 9 category: Numeric 10 build-type: Simple 11 tested-with: GHC == 8.2.2, GHC == 8.8.3 12 cabal-version: >= 1.10 13 description: 14 The classic Metropolis algorithm. 15 . 16 Wander around parameter space according to a simple spherical Gaussian 17 distribution. 18 . 19 Exports a 'mcmc' function that prints a trace to stdout, a 'chain' function 20 for collecting results in-memory, and a 'metropolis' transition operator that 21 can be used more generally. 22 . 23 > import Numeric.MCMC.Metropolis 24 > 25 > rosenbrock :: [Double] -> Double 26 > rosenbrock [x0, x1] = negate (5 *(x1 - x0 ^ 2) ^ 2 + 0.05 * (1 - x0) ^ 2) 27 > 28 > main :: IO () 29 > main = withSystemRandom . asGenIO $ mcmc 10000 1 [0, 0] rosenbrock 30 31 Source-repository head 32 Type: git 33 Location: http://github.com/jtobin/mighty-metropolis.git 34 35 library 36 default-language: Haskell2010 37 ghc-options: 38 -Wall 39 exposed-modules: 40 Numeric.MCMC.Metropolis 41 build-depends: 42 base >= 4 && < 6 43 , kan-extensions >= 5 && < 6 44 , pipes >= 4 && < 5 45 , primitive >= 0.6 && < 1.0 46 , mcmc-types >= 1.0.1 47 , mwc-probability >= 1.0.1 48 , transformers >= 0.5 && < 1.0 49 50 Test-suite rosenbrock 51 type: exitcode-stdio-1.0 52 hs-source-dirs: test 53 main-is: Rosenbrock.hs 54 default-language: Haskell2010 55 ghc-options: 56 -rtsopts 57 build-depends: 58 base >= 4 && < 6 59 , mighty-metropolis 60 , mwc-probability >= 1.0.1 61 62 Test-suite bnn 63 type: exitcode-stdio-1.0 64 hs-source-dirs: test 65 main-is: BNN.hs 66 default-language: Haskell2010 67 ghc-options: 68 -rtsopts 69 build-depends: 70 base >= 4 && < 6 71 , containers >= 0.5 && < 0.8 72 , mighty-metropolis 73 , mwc-probability >= 1.0.1 74 75 Test-suite tests 76 type: exitcode-stdio-1.0 77 hs-source-dirs: test 78 main-is: Spec.hs 79 default-language: Haskell2010 80 ghc-options: 81 -rtsopts 82 build-depends: 83 base >= 4 && < 6 84 , containers >= 0.5 && < 0.8 85 , foldl 86 , mighty-metropolis 87 , mwc-probability >= 1.0.1 88 , hspec 89 , mwc-random 90 , mcmc-types