Skip to main content

Nessai: Nested Sampling with Aritificial Intelligence

Project description

DOI PyPI Documentation Status tests int-tests codecov

nessai: Nested Sampling with Artificial Intelligence

nessai (/ˈnɛsi/): Nested Sampling with Artificial Intelligence

nessai is a nested sampling algorithm for Bayesian Inference that incorporates normalisings flows. It is designed for applications where the Bayesian likelihood is computationally expensive.

Installation

nessai can be installed using pip:

$ pip install nessai

Installing via conda is not currently supported.

PyTorch

By default the version of PyTorch will not necessarily match the drivers on your system, to install a different version with the correct CUDA support see the PyTorch homepage for instructions: https://pytorch.org/.

Using bilby

As of bilby version 1.1.0, nessai is now supported by default but it is still an optional requirement. See the bilby documentation for installation instructions for bilby

See the examples included with nessai for how to run nessai via bilby.

Documentation

Documentation is available at: nessai.readthedocs.io

Contributing

Please see the guidelines here.

Acknowledgements

The core nested sampling code, model design and code for computing the posterior in nessai was based on cpnest with permission from the authors.

The normalising flows implemented in nessai are all either directly imported from nflows or heavily based on it.

Other code snippets that draw on existing code reference the source in their corresponding doc-strings.

Citing

If you find nessai useful in your work please cite the DOI for this code and our paper:

@software{nessai,
  author       = {Michael J. Williams},
  title        = {nessai: Nested Sampling with Artificial Intelligence},
  month        = feb,
  year         = 2021,
  publisher    = {Zenodo},
  version      = {latest},
  doi          = {10.5281/zenodo.4550693},
  url          = {https://doi.org/10.5281/zenodo.4550693}
}

@article{PhysRevD.103.103006,
  title = {Nested sampling with normalizing flows for gravitational-wave inference},
  author = {Williams, Michael J. and Veitch, John and Messenger, Chris},
  journal = {Phys. Rev. D},
  volume = {103},
  issue = {10},
  pages = {103006},
  numpages = {19},
  year = {2021},
  month = {May},
  publisher = {American Physical Society},
  doi = {10.1103/PhysRevD.103.103006},
  url = {https://link.aps.org/doi/10.1103/PhysRevD.103.103006}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nessai-0.3.2.tar.gz (463.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nessai-0.3.2-py3-none-any.whl (100.6 kB view details)

Uploaded Python 3

File details

Details for the file nessai-0.3.2.tar.gz.

File metadata

  • Download URL: nessai-0.3.2.tar.gz
  • Upload date:
  • Size: 463.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nessai-0.3.2.tar.gz
Algorithm Hash digest
SHA256 527c14ee096416c5d81dce06f23baf33f421ccc88a28b1f4c8e058b85fca5645
MD5 e8faede65f75a5465e984441258a56fc
BLAKE2b-256 d14ede7c54de1e49700585057bc729191e0f190fd01ad3b7c4a2446cccfc06a4

See more details on using hashes here.

File details

Details for the file nessai-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: nessai-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 100.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for nessai-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37a23cfc78abe75d5ed1f845c75284d494d505c4173ebdcc996c1a5b41a3c401
MD5 e736052f4bb8c42644febf8f16093f7c
BLAKE2b-256 85ca6bd2544c1756c0bb7c92d640b4fc7ba1100b40962a7589d4f5445c799a4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page