Pythonic Bayesian inference and visualization for the MultiNest Nested Sampling Algorithm and PyCuba's cubature algorithms.
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc updated doc version [skip ci] Nov 27, 2017
pycuba Allow for ctypes-based callbacks. Apr 27, 2016
pymultinest allow silent analyser Nov 27, 2017
pypolychord Working prototype for a PolyChord interface Jun 12, 2015
tests apparently Python3 does not have has_key Nov 27, 2017
.coveragerc added CI Nov 27, 2017
.gitignore Support for Python3 and partial support of MultiNest v3.0 with INS Jul 3, 2013
.travis.yml add cuba demo to travis Nov 27, 2017
COPYING added GPLv3 license Jan 5, 2012
INSTALL added pycuba doc; referring to tutorial; improved install doc Dec 2, 2013
LICENSE added MultiNest license exception Dec 1, 2013
README.rst updated feature overview [skip ci] Nov 27, 2017
conda-requirements.txt added CI Nov 27, 2017
model_compare.py added model comparison script Apr 20, 2017
multinest_marginals.py updated README + multinest_marginals gives instructions for parameter… Nov 27, 2017
pycuba_demo.py fixed Python3 has_key pycuba demo issue Nov 27, 2017
pymultinest_demo.py removed apemost, improved documentation, version 2.5 Nov 27, 2017
pymultinest_demo_minimal.py recommending new more pythonic API in demo scripts Apr 20, 2017
pymultinest_demo_old.py recommending new more pythonic API in demo scripts Apr 20, 2017
pymultinest_solver_demo.py implemented storage in temp directory if outputfiles_basename not given Jan 28, 2015
pypolychord_demo.py Fixes issue #55 (os.path.mkdir -> os.mkdir) Jun 12, 2015
setup.cfg allowing binary wheel distribution [skip ci] Nov 27, 2017
setup.py allow silent analyser Nov 27, 2017

README.rst

PyMultiNest -- Python interface for MultiNest

This library provides programmatic access to MultiNest and PyCuba.

What is MultiNest?

MultiNest is a program and a sampling technique. As a Bayesian inference technique, it allows parameter estimation and model selection. (find out more in the MultiNest paper, http://arxiv.org/abs/0809.3437, or in a classic MCMC sampler, http://apemost.sf.net/ ). Recently, MultiNest added Importance Nested Sampling (INS, see http://arxiv.org/abs/1306.2144) which is now also supported.

The efficient Monte Carlo algorithm for sampling the parameter space is based on nested sampling and the idea of disjoint multi-dimensional ellipse sampling.

For the scientific community, where Python is becoming the new lingua franca (luckily), I provide an interface to MultiNest.

https://travis-ci.org/JohannesBuchner/PyMultiNest.svg?branch=master

The automatic build makes sure both Python 2.7 and Python 3 are working correctly with MultiNest and Cuba. It also tests that MultiNest works with MPI enabled.

What does PyMultiNest do?

PyMultiNest

  • provides an easy-to-use interface to MultiNest and Cuba integration algorithms
  • allows connecting with your existing scientific Python code (numpy, scipy)
  • allows Prior & LogLikelihood functions written in Python.
  • Easy plotting, visualization and summary of MultiNest results.
  • Running MultiNest with MPI

The plotting can also be run on existing MultiNest output, and when not using PyMultiNest for running MultiNest.

Citing PyMultiNest

See http://johannesbuchner.github.com/PyMultiNest/index.html#citing-pymultinest

Questions and Problems

For any questions or problems with the software, please open an issue. This helps other people google the same question.

Using MultiNest with Python?

Look at the documentation available at http://johannesbuchner.github.com/PyMultiNest/index.html

What is PyCuba?

Cuba (http://www.feynarts.de/cuba/, https://github.com/JohannesBuchner/cuba) is a multidimensional numerical integration library for low dimensions. PyCuba allows integration of Python functions, providing an advanced alternative to the basic functions provided in scipy.integrate.

In the Bayesian sense, it is possible to use Cuba for model selection.

Q: Python callback functions are too slow!

If you really identified that your callback functions are too slow, even when using the usual tricks (numpy, etc.), you can implement and compile them as C functions.

You still have the neat python interface (default parameters, etc.), but achieve full execution speed, as only native code is executed while MultiNest runs.