mighty-metropolis: The Metropolis algorithm.

[ library, mit, numeric ] [ Propose Tags ]

The classic Metropolis algorithm.

Wander around parameter space according to a simple spherical Gaussian distribution.

Exports a mcmc function that prints a trace to stdout, a chain function for collecting results in-memory, and a metropolis transition operator that can be used more generally.

import Numeric.MCMC.Metropolis

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

main :: IO ()
main = withSystemRandom . asGenIO $ mcmc 10000 1 [0, 0] rosenbrock

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.2.0, 2.0.0
Dependencies base (>=4 && <6), kan-extensions (>=5 && <6), mcmc-types (>=1.0.1), mwc-probability (>=1.0.1), pipes (>=4 && <5), primitive (>=0.6 && <1.0), transformers (>=0.5 && <1.0) [details]
License MIT
Author Jared Tobin
Maintainer jared@jtobin.ca
Category Numeric
Home page http://github.com/jtobin/mighty-metropolis
Source repo head: git clone http://github.com/jtobin/mighty-metropolis.git
Uploaded by JaredTobin at 2020-05-21T17:22:32Z
Distributions LTSHaskell:2.0.0, NixOS:2.0.0, Stackage:2.0.0
Reverse Dependencies 1 direct, 1 indirect [details]
Downloads 5241 total (38 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-05-21 [all 1 reports]