Classic Nested Sampling in Haskell.
Haskell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/NestedSampling
test
.gitignore
LICENSE
NestedSampling-hs.cabal
README.md
Setup.hs
stack.yaml

README.md

NestedSampling.hs

MIT License

(c) 2016 Brendon J. Brewer and Jared Tobin

This is a Haskell implementation of the classic Nested Sampling algorithm introduced by John Skilling. You can use it for Bayesian inference, statistical mechanics, and optimisation applications.

There are a few examples included that you can run using Stack as follows:

$ stack test NestedSampling-hs:test:spikeslab
$ stack test NestedSampling-hs:test:rosenbrock

.. and so on. Check the .cabal file for a list of examples, the code for which can always be found in the test directory.

Running any of these examples will log sampling progress to stdout and also dump output information to a couple of CSV files:

  • nested_sampling_info.csv includes log x, log prior weight, log likelihood, current log evidence estimate, and current information estimate by sampler iteration.
  • nested_sampling_parameters.csv includes parameter information (where one line = one sample).