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.
.. image:: https://travis-ci.com/JohannesBuchner/PyMultiNest.svg?branch=master
:target: https://travis-ci.com/JohannesBuchner/PyMultiNest
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.io/PyMultiNest/index.html#citing-pymultinest
Plotting results, corner and trace plots
--------------------------------------------
If you got pymultinest running with your likelihood (based on the pymultinest_demo*.py examples),
you can create plots of the marginal probability distributions.
If you set outputfiles_basename="myprefix-" in the run,
you need to create a file myprefix-params.json which gives the names of each parameters,
for example::
[
"param1",
"param2",
"$N\_\mathrm{H}$",
"norm",
]
Then you can run::
$ python pymultinest-folder/multinest_marginals.py myprefix-
which will create marginal plots for you.
Recently I also added support for `corner.py <https://corner.readthedocs.io/>`_ (needs to be installed)::
$ python pymultinest-folder/multinest_marginals_corner.py myprefix-
Also possible is trace and corner plots::
$ python pymultinest-folder/multinest_marginals_fancy.py myprefix-
This last one has some potential drawbacks however: The code I borrowed here
from dynesty is not meant for multi-modal nested sampling which reorders the
points, so the trace plot may not be 100% correct for multi-modal problems.
Questions and Problems
--------------------------------------------
For any questions or problems with the software, please `open an issue <https://github.com/JohannesBuchner/PyMultiNest/issues>`_.
This helps other people google the same question.
Using MultiNest with Python?
--------------------------------------------
Look at the documentation available at http://johannesbuchner.github.io/PyMultiNest/
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.
Raw data
{
"_id": null,
"home_page": "https://johannesbuchner.github.io/PyMultiNest/",
"name": "pymultinest",
"maintainer": "Johannes Buchner",
"docs_url": null,
"requires_python": "",
"maintainer_email": "johannes.buchner.acad@gmx.com",
"keywords": "",
"author": "Johannes Buchner",
"author_email": "johannes.buchner.acad@gmx.com",
"download_url": "https://files.pythonhosted.org/packages/55/f2/99a108aca74a6c1d9390d328a2e94b57e76695d7b365a89b7b5027a0b710/pymultinest-2.12.tar.gz",
"platform": null,
"description": "PyMultiNest -- Python interface for MultiNest\n==============================================\n\nThis library provides programmatic access to MultiNest and PyCuba.\n\nWhat is MultiNest?\n-------------------\n\nMultiNest is a program and a sampling technique. As a Bayesian inference technique,\nit allows parameter estimation and model selection. (find out more in the \nMultiNest paper, http://arxiv.org/abs/0809.3437, or in a classic MCMC sampler, \nhttp://apemost.sf.net/ ). Recently, MultiNest added Importance Nested Sampling \n(INS, see http://arxiv.org/abs/1306.2144) which is now also supported.\n\nThe efficient Monte Carlo algorithm for sampling the parameter space is based \non nested sampling and the idea of disjoint multi-dimensional ellipse sampling.\n\nFor the scientific community, where Python is becoming the new lingua franca (luckily),\nI provide an interface to MultiNest.\n\n.. image:: https://travis-ci.com/JohannesBuchner/PyMultiNest.svg?branch=master\n :target: https://travis-ci.com/JohannesBuchner/PyMultiNest\n\nThe automatic build makes sure both Python 2.7 and Python 3 are working correctly \nwith MultiNest and Cuba. It also tests that MultiNest works with MPI enabled.\n\nWhat does PyMultiNest do?\n--------------------------\n\nPyMultiNest \n\n * provides an easy-to-use interface to MultiNest and Cuba integration algorithms\n\n * allows connecting with your existing scientific Python code (numpy, scipy)\n\n * allows Prior & LogLikelihood functions written in Python.\n \n * Easy plotting, visualization and summary of MultiNest results.\n \n * Running MultiNest with MPI\n\nThe plotting can also be run on existing MultiNest output, and when not using PyMultiNest for running MultiNest.\n\nCiting PyMultiNest\n--------------------------------------------\nSee http://johannesbuchner.github.io/PyMultiNest/index.html#citing-pymultinest\n\nPlotting results, corner and trace plots\n--------------------------------------------\n\nIf you got pymultinest running with your likelihood (based on the pymultinest_demo*.py examples),\nyou can create plots of the marginal probability distributions.\n\nIf you set outputfiles_basename=\"myprefix-\" in the run,\nyou need to create a file myprefix-params.json which gives the names of each parameters,\nfor example::\n\n\t[\n\t \"param1\",\n\t \"param2\",\n\t \"$N\\_\\mathrm{H}$\",\n\t \"norm\",\n\t]\n\nThen you can run::\n\n\t$ python pymultinest-folder/multinest_marginals.py myprefix-\n\nwhich will create marginal plots for you.\n\nRecently I also added support for `corner.py <https://corner.readthedocs.io/>`_ (needs to be installed)::\n\n\t$ python pymultinest-folder/multinest_marginals_corner.py myprefix-\n\nAlso possible is trace and corner plots::\n\n\t$ python pymultinest-folder/multinest_marginals_fancy.py myprefix-\n\nThis last one has some potential drawbacks however: The code I borrowed here\nfrom dynesty is not meant for multi-modal nested sampling which reorders the \npoints, so the trace plot may not be 100% correct for multi-modal problems.\n\nQuestions and Problems\n--------------------------------------------\n\nFor any questions or problems with the software, please `open an issue <https://github.com/JohannesBuchner/PyMultiNest/issues>`_.\nThis helps other people google the same question.\n\nUsing MultiNest with Python?\n--------------------------------------------\nLook at the documentation available at http://johannesbuchner.github.io/PyMultiNest/\n\nWhat is PyCuba?\n--------------------------------------------\nCuba (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.\n\nIn the Bayesian sense, it is possible to use Cuba for model selection.\n\nQ: Python callback functions are too slow!\n-------------------------------------------\nIf you really identified that your callback functions are too slow, even\nwhen using the usual tricks (numpy, etc.), you can implement and compile \nthem as C functions.\n\nYou still have the neat python interface (default parameters, etc.), but\nachieve full execution speed, as only native code is executed while\nMultiNest runs.\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "Access modules for the MultiNest and Cuba integration libraries",
"version": "2.12",
"project_urls": {
"Homepage": "https://johannesbuchner.github.io/PyMultiNest/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6925a603aa4cf4d7653e8ff492da93302920fecdd3bb3e3b1b05bb1a1176f721",
"md5": "23d6d2efddf9e453fbe4938f5da68bcf",
"sha256": "c643d789364169f3a98c2f1966fdbe2eabff923747d42dc44eac7f8206052722"
},
"downloads": -1,
"filename": "pymultinest-2.12-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "23d6d2efddf9e453fbe4938f5da68bcf",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 50845,
"upload_time": "2023-07-28T22:13:56",
"upload_time_iso_8601": "2023-07-28T22:13:56.249626Z",
"url": "https://files.pythonhosted.org/packages/69/25/a603aa4cf4d7653e8ff492da93302920fecdd3bb3e3b1b05bb1a1176f721/pymultinest-2.12-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fcbded03c4a2fd37eacdb1cbb8c327132fdfc115e0c0eb672421d3306ac38f58",
"md5": "bdad8269e6e169a17c489efbd876f9e9",
"sha256": "325d63fa0c60211e2eaa82c863c30196752f959e5777dfb848822dde01909904"
},
"downloads": -1,
"filename": "pymultinest-2.12-py3.10.egg",
"has_sig": false,
"md5_digest": "bdad8269e6e169a17c489efbd876f9e9",
"packagetype": "bdist_egg",
"python_version": "2.12",
"requires_python": null,
"size": 62754,
"upload_time": "2023-07-28T22:13:57",
"upload_time_iso_8601": "2023-07-28T22:13:57.921460Z",
"url": "https://files.pythonhosted.org/packages/fc/bd/ed03c4a2fd37eacdb1cbb8c327132fdfc115e0c0eb672421d3306ac38f58/pymultinest-2.12-py3.10.egg",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "55f299a108aca74a6c1d9390d328a2e94b57e76695d7b365a89b7b5027a0b710",
"md5": "94de61d6e615d2e36b835ff99211c11d",
"sha256": "a8ac6787fa0dd9b374a3a2e981d48a1975e935ac846a8083d209078443d3e90c"
},
"downloads": -1,
"filename": "pymultinest-2.12.tar.gz",
"has_sig": false,
"md5_digest": "94de61d6e615d2e36b835ff99211c11d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 883312,
"upload_time": "2023-07-28T22:13:36",
"upload_time_iso_8601": "2023-07-28T22:13:36.283184Z",
"url": "https://files.pythonhosted.org/packages/55/f2/99a108aca74a6c1d9390d328a2e94b57e76695d7b365a89b7b5027a0b710/pymultinest-2.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-28 22:13:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pymultinest"
}