The NestedSampling package

[Tags: gpl, library]

Nested Sampling is a numerical algorithm for approximate Bayesian inference. It generates samples from the posterior distribution but its main purpose is to estimate the evidence P(M|D) of the model conditioned on the observed data. More information on Nested Sampling is available at

The original code can be found at along with documentation at An example program called lighthouse.hs is included.

So far, only the simple demonstration file called mininest.c has been ported. There is a more sophisticated C library available at but it has not been ported to Haskell yet.

[Skip to ReadMe]


Versions0.1.1, 0.1.2, 0.1.3, 0.1.4
Change logNone available
Dependenciesbase (==4.*), NestedSampling, random, vector [details]
Copyright(C) Sivia, Skilling 2006, Trotts 2011
AuthorIssac Trotts
Home page
UploadedMon Sep 19 07:50:25 UTC 2011 by IssacTrotts
Downloads885 total (28 in last 30 days)
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]




Maintainers' corner

For package maintainers and hackage trustees

Readme for NestedSampling-0.1.2

The code here is a fairly straightforward translation of the tutorial
nested sampling code from Skilling and Sivia. The translation was
done by Issac Trotts starting in June 2011.

What follows is an adaptation of the original README:

This directory holds little toy nested-sampling programs
in Haskell, adapted from the C code in the update of Devinder's book "Data
Analysis: a Bayesian Tutorial" (2nd edition) OUP 2006.

To get started, install Haskell (GHC), then run
$ cabal install

Try out the example program like this:

$ lighthouse 
logZ: -160.48 +- 0.17
information: 2.90 nats
1000 samples

x = 1.25 +- 0.18
y = 1.00 +- 0.20

Details can be found at the top of lighthouse.hs.