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.

The authors also thank Laurence Datrier, Fergus Hayes and Jethro Linley 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.6.0.tar.gz (497.7 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.6.0-py3-none-any.whl (112.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nessai-0.6.0.tar.gz
  • Upload date:
  • Size: 497.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for nessai-0.6.0.tar.gz
Algorithm Hash digest
SHA256 54fa545410ae9f10159b79ac337e545170f0fe26f5caad6c3cedeb4a337bf50f
MD5 8c3c6680a0386396b80830eefbe27bb9
BLAKE2b-256 09e054dcf5df2e5fbdf944971e146e6a55b17bd9181f9bf0e71a44a63cc889d8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nessai-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f801261e07219436cf6e3198ef55cd76e499b4618d09abe847738a5c2ade3d52
MD5 7f4b5787789ea5d5d63ade8a28e182cf
BLAKE2b-256 8d84b0bc7ba517db8f5423fe6d2f122ffc1b4e3b7eba47364b64e458b7fbebe8

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