nautilus-sampler


Namenautilus-sampler JSON
Version 1.0.4 PyPI version JSON
download
home_pageNone
SummaryNeural Network-Boosted Importance Sampling for Bayesian Statistics
upload_time2024-07-27 20:29:13
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Logo](https://raw.githubusercontent.com/johannesulf/nautilus/main/docs/nautilus_text_image.png "Logo")

[![Unit Testing Status](https://img.shields.io/github/actions/workflow/status/johannesulf/nautilus/tests.yml?branch=main&label=tests)](https://github.com/johannesulf/nautilus/actions)
[![Documentation Status](https://img.shields.io/readthedocs/nautilus-sampler)](https://nautilus-sampler.readthedocs.io/en/latest/)
[![Code Coverage](https://img.shields.io/coverallsCoverage/github/johannesulf/nautilus)](https://coveralls.io/github/johannesulf/nautilus?branch=main)
[![PyPI](https://img.shields.io/pypi/v/nautilus-sampler)](https://pypi.org/project/nautilus-sampler/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/nautilus-sampler)](https://pypi.org/project/nautilus-sampler/)
[![Conda](https://img.shields.io/conda/vn/conda-forge/nautilus-sampler)](https://anaconda.org/conda-forge/nautilus-sampler)
[![Conda - Downloads](https://img.shields.io/conda/dn/conda-forge/nautilus-sampler)](https://anaconda.org/conda-forge/nautilus-sampler)
[![License: MIT](https://img.shields.io/github/license/johannesulf/nautilus)](https://raw.githubusercontent.com/johannesulf/nautilus/main/LICENSE)
![Language: Python](https://img.shields.io/github/languages/top/johannesulf/nautilus)

Nautilus is an MIT-licensed pure-Python package for Bayesian posterior and evidence estimation. It utilizes importance sampling and efficient space exploration using neural networks. Compared to traditional MCMC and Nested Sampling codes, it often needs fewer likelihood calls and produces much larger posterior samples. Additionally, nautilus is highly accurate and produces Bayesian evidence estimates with percent precision. It is widely used in many areas of astrophysical research.

## Example

This example, sampling a 3-dimensional Gaussian, illustrates how to use nautilus.

```python
import corner
import numpy as np
from nautilus import Prior, Sampler
from scipy.stats import multivariate_normal

prior = Prior()
for key in 'abc':
    prior.add_parameter(key)

def likelihood(param_dict):
    x = [param_dict[key] for key in 'abc']
    return multivariate_normal.logpdf(x, mean=[0.4, 0.5, 0.6], cov=0.01)

sampler = Sampler(prior, likelihood)
sampler.run(verbose=True)
points, log_w, log_l = sampler.posterior()
corner.corner(points, weights=np.exp(log_w), labels='abc')
```

## Installation

The most recent stable version of nautilus is listed in the Python Package Index (PyPI) and can be installed via ``pip``.

```shell
pip install nautilus-sampler
```

Additionally, nautilus is also on conda-forge. To install via ``conda`` use the following command.

```shell
conda install -c conda-forge nautilus-sampler
```

## Documentation

You can find the documentation at [nautilus-sampler.readthedocs.io](https://nautilus-sampler.readthedocs.io).

## Attribution

A paper describing nautilus's underlying methods and performance has been published in the [Monthly Notices of the Royal Astronomical Society](https://academic.oup.com/mnras/article/525/2/3181/7243406). A draft of the paper is also available on [arXiv](https://arxiv.org/abs/2306.16923). Please cite the paper if you find nautilus helpful in your research.

```
@article{nautilus,
    author = {Lange, Johannes U},
    title = "{nautilus: boosting Bayesian importance nested sampling with deep learning}",
    journal = {Monthly Notices of the Royal Astronomical Society},
    volume = {525},
    number = {2},
    pages = {3181-3194},
    year = {2023},
    month = {08},
    doi = {10.1093/mnras/stad2441},
    url = {https://doi.org/10.1093/mnras/stad2441},
    eprint = {https://academic.oup.com/mnras/article-pdf/525/2/3181/51331635/stad2441.pdf},
}
```

## License

Nautilus is licensed under the MIT License. The logo uses an image from the Illustris Collaboration.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nautilus-sampler",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "\"Johannes U. Lange\" <julange.astro@pm.me>",
    "download_url": "https://files.pythonhosted.org/packages/68/cc/8f71e41aac544a1273091ca3c82d211e6e6a11b9ef705be3ea74eb1e931d/nautilus_sampler-1.0.4.tar.gz",
    "platform": null,
    "description": "![Logo](https://raw.githubusercontent.com/johannesulf/nautilus/main/docs/nautilus_text_image.png \"Logo\")\n\n[![Unit Testing Status](https://img.shields.io/github/actions/workflow/status/johannesulf/nautilus/tests.yml?branch=main&label=tests)](https://github.com/johannesulf/nautilus/actions)\n[![Documentation Status](https://img.shields.io/readthedocs/nautilus-sampler)](https://nautilus-sampler.readthedocs.io/en/latest/)\n[![Code Coverage](https://img.shields.io/coverallsCoverage/github/johannesulf/nautilus)](https://coveralls.io/github/johannesulf/nautilus?branch=main)\n[![PyPI](https://img.shields.io/pypi/v/nautilus-sampler)](https://pypi.org/project/nautilus-sampler/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/nautilus-sampler)](https://pypi.org/project/nautilus-sampler/)\n[![Conda](https://img.shields.io/conda/vn/conda-forge/nautilus-sampler)](https://anaconda.org/conda-forge/nautilus-sampler)\n[![Conda - Downloads](https://img.shields.io/conda/dn/conda-forge/nautilus-sampler)](https://anaconda.org/conda-forge/nautilus-sampler)\n[![License: MIT](https://img.shields.io/github/license/johannesulf/nautilus)](https://raw.githubusercontent.com/johannesulf/nautilus/main/LICENSE)\n![Language: Python](https://img.shields.io/github/languages/top/johannesulf/nautilus)\n\nNautilus is an MIT-licensed pure-Python package for Bayesian posterior and evidence estimation. It utilizes importance sampling and efficient space exploration using neural networks. Compared to traditional MCMC and Nested Sampling codes, it often needs fewer likelihood calls and produces much larger posterior samples. Additionally, nautilus is highly accurate and produces Bayesian evidence estimates with percent precision. It is widely used in many areas of astrophysical research.\n\n## Example\n\nThis example, sampling a 3-dimensional Gaussian, illustrates how to use nautilus.\n\n```python\nimport corner\nimport numpy as np\nfrom nautilus import Prior, Sampler\nfrom scipy.stats import multivariate_normal\n\nprior = Prior()\nfor key in 'abc':\n    prior.add_parameter(key)\n\ndef likelihood(param_dict):\n    x = [param_dict[key] for key in 'abc']\n    return multivariate_normal.logpdf(x, mean=[0.4, 0.5, 0.6], cov=0.01)\n\nsampler = Sampler(prior, likelihood)\nsampler.run(verbose=True)\npoints, log_w, log_l = sampler.posterior()\ncorner.corner(points, weights=np.exp(log_w), labels='abc')\n```\n\n## Installation\n\nThe most recent stable version of nautilus is listed in the Python Package Index (PyPI) and can be installed via ``pip``.\n\n```shell\npip install nautilus-sampler\n```\n\nAdditionally, nautilus is also on conda-forge. To install via ``conda`` use the following command.\n\n```shell\nconda install -c conda-forge nautilus-sampler\n```\n\n## Documentation\n\nYou can find the documentation at [nautilus-sampler.readthedocs.io](https://nautilus-sampler.readthedocs.io).\n\n## Attribution\n\nA paper describing nautilus's underlying methods and performance has been published in the [Monthly Notices of the Royal Astronomical Society](https://academic.oup.com/mnras/article/525/2/3181/7243406). A draft of the paper is also available on [arXiv](https://arxiv.org/abs/2306.16923). Please cite the paper if you find nautilus helpful in your research.\n\n```\n@article{nautilus,\n    author = {Lange, Johannes U},\n    title = \"{nautilus: boosting Bayesian importance nested sampling with deep learning}\",\n    journal = {Monthly Notices of the Royal Astronomical Society},\n    volume = {525},\n    number = {2},\n    pages = {3181-3194},\n    year = {2023},\n    month = {08},\n    doi = {10.1093/mnras/stad2441},\n    url = {https://doi.org/10.1093/mnras/stad2441},\n    eprint = {https://academic.oup.com/mnras/article-pdf/525/2/3181/51331635/stad2441.pdf},\n}\n```\n\n## License\n\nNautilus is licensed under the MIT License. The logo uses an image from the Illustris Collaboration.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Neural Network-Boosted Importance Sampling for Bayesian Statistics",
    "version": "1.0.4",
    "project_urls": {
        "Home": "https://nautilus-sampler.readthedocs.io"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fc380e26cfac85175951a68015ffab4660011b605b21ebfcf97b95158487f08f",
                "md5": "85c1baca0f89bf32cbac3cba8c89dfd1",
                "sha256": "e33cb998ce2443dfcb4af93b8ca98baf5b01cba5421b4db709c32481965fecf8"
            },
            "downloads": -1,
            "filename": "nautilus_sampler-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "85c1baca0f89bf32cbac3cba8c89dfd1",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 32937,
            "upload_time": "2024-07-27T20:29:12",
            "upload_time_iso_8601": "2024-07-27T20:29:12.401780Z",
            "url": "https://files.pythonhosted.org/packages/fc/38/0e26cfac85175951a68015ffab4660011b605b21ebfcf97b95158487f08f/nautilus_sampler-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "68cc8f71e41aac544a1273091ca3c82d211e6e6a11b9ef705be3ea74eb1e931d",
                "md5": "ddce17cff2b0c1a651fadb3c0ae416bf",
                "sha256": "9a4c74affce44e9bf77adf7b1662f604b0f9283cbb810ffc7dab078d7f3142f6"
            },
            "downloads": -1,
            "filename": "nautilus_sampler-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "ddce17cff2b0c1a651fadb3c0ae416bf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 40823,
            "upload_time": "2024-07-27T20:29:13",
            "upload_time_iso_8601": "2024-07-27T20:29:13.771271Z",
            "url": "https://files.pythonhosted.org/packages/68/cc/8f71e41aac544a1273091ca3c82d211e6e6a11b9ef705be3ea74eb1e931d/nautilus_sampler-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-27 20:29:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "nautilus-sampler"
}
        
Elapsed time: 0.61855s