Skip to main content

Nessai: Nested Sampling with Artificial Intelligence

Project description

DOI PyPI Conda Version Documentation Status license 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

or via conda

conda install -c conda-forge -c pytorch nessai

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.

The authors also thank Christian Chapman-Bird, Laurence Datrier, Fergus Hayes, Jethro Linley and Simon Tait for their feedback and help finding bugs in nessai.

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.8.0b0.tar.gz (518.8 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.8.0b0-py3-none-any.whl (122.6 kB view details)

Uploaded Python 3

File details

Details for the file nessai-0.8.0b0.tar.gz.

File metadata

  • Download URL: nessai-0.8.0b0.tar.gz
  • Upload date:
  • Size: 518.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for nessai-0.8.0b0.tar.gz
Algorithm Hash digest
SHA256 1689ea57950a88c3f5f1f9ed0fce63084287ea0408dd64c7f4b021da404239b0
MD5 3a38b8d815f5187c83e7aaaf4691e151
BLAKE2b-256 a6f09c4fe1d5c3c21a34454542facb209f1ba7a431f6d02787c95b75afdddd72

See more details on using hashes here.

File details

Details for the file nessai-0.8.0b0-py3-none-any.whl.

File metadata

  • Download URL: nessai-0.8.0b0-py3-none-any.whl
  • Upload date:
  • Size: 122.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for nessai-0.8.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 79a4cb9335bd0e5e4282b937831ed8784494748e7a2e8737692d71a33656fe97
MD5 2e630b1bd075420c01ac998f26f19450
BLAKE2b-256 b210d575dade59e812bad4fa8faa59587ae9824b0c4efc105be13102320c8312

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