# sbijax
[![active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![ci](https://github.com/dirmeier/sbijax/actions/workflows/ci.yaml/badge.svg)](https://github.com/dirmeier/sbijax/actions/workflows/ci.yaml)
[![version](https://img.shields.io/pypi/v/sbijax.svg?colorB=black&style=flat)](https://pypi.org/project/sbijax/)
> Simulation-based inference in JAX
## About
`sbijax` implements several algorithms for simulation-based inference in
[JAX](https://github.com/google/jax) using [Haiku](https://github.com/deepmind/dm-haiku),
[Distrax](https://github.com/deepmind/distrax) and [BlackJAX](https://github.com/blackjax-devs/blackjax). Specifically, `sbijax` implements
- [Sequential Monte Carlo ABC](https://www.routledge.com/Handbook-of-Approximate-Bayesian-Computation/Sisson-Fan-Beaumont/p/book/9780367733728) (`SMCABC`)
- [Neural Likelihood Estimation](https://arxiv.org/abs/1805.07226) (`SNL`)
- [Surjective Neural Likelihood Estimation](https://arxiv.org/abs/2308.01054) (`SSNL`)
- [Neural Posterior Estimation C](https://arxiv.org/abs/1905.07488) (short `SNP`)
- [Contrastive Neural Ratio Estimation](https://arxiv.org/abs/2210.06170) (short `SNR`)
- [Neural Approximate Sufficient Statistics](https://arxiv.org/abs/2010.10079) (`SNASS`)
- [Neural Approximate Slice Sufficient Statistics](https://openreview.net/forum?id=jjzJ768iV1) (`SNASSS`)
- [Flow matching posterior estimation](https://arxiv.org/abs/2305.17161) (`SFMPE`)
- [Consistency model posterior estimation](https://arxiv.org/abs/2312.05440) (`SCMPE`)
where the acronyms in parentheses denote the names of the methods in `sbijax`.
> [!CAUTION]
> ⚠️ As per the LICENSE file, there is no warranty whatsoever for this free software tool. If you discover bugs, please report them.
## Examples
You can find several self-contained examples on how to use the algorithms in [examples](https://github.com/dirmeier/sbijax/tree/main/examples).
## Documentation
Documentation can be found [here](https://sbijax.readthedocs.io/en/latest/).
## Installation
Make sure to have a working `JAX` installation. Depending whether you want to use CPU/GPU/TPU,
please follow [these instructions](https://github.com/google/jax#installation).
To install from PyPI, just call the following on the command line:
```bash
pip install sbijax
```
To install the latest GitHub <RELEASE>, use:
```bash
pip install git+https://github.com/dirmeier/sbijax@<RELEASE>
```
## Acknowledgements
> [!NOTE]
> 📝 The API of the package is heavily inspired by the excellent Pytorch-based [`sbi`](https://github.com/sbi-dev/sbi) package which is substantially more
feature-complete and user-friendly, and better documented.
## Author
Simon Dirmeier <a href="mailto:sfyrbnd @ pm me">sfyrbnd @ pm me</a>
Raw data
{
"_id": null,
"home_page": "",
"name": "sbijax",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "abc,approximate Bayesian computation,normalizing flows,simulation-based inference,smc-abc",
"author": "",
"author_email": "Simon Dirmeier <sfyrbnd@pm.me>",
"download_url": "https://files.pythonhosted.org/packages/a6/b0/7da8e31a6b35d86a15c53aae99c55fe809056aa8c9351549a6d341552181/sbijax-0.2.0.tar.gz",
"platform": null,
"description": "# sbijax\n\n[![active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![ci](https://github.com/dirmeier/sbijax/actions/workflows/ci.yaml/badge.svg)](https://github.com/dirmeier/sbijax/actions/workflows/ci.yaml)\n[![version](https://img.shields.io/pypi/v/sbijax.svg?colorB=black&style=flat)](https://pypi.org/project/sbijax/)\n\n> Simulation-based inference in JAX\n\n## About\n\n`sbijax` implements several algorithms for simulation-based inference in\n[JAX](https://github.com/google/jax) using [Haiku](https://github.com/deepmind/dm-haiku),\n[Distrax](https://github.com/deepmind/distrax) and [BlackJAX](https://github.com/blackjax-devs/blackjax). Specifically, `sbijax` implements\n\n- [Sequential Monte Carlo ABC](https://www.routledge.com/Handbook-of-Approximate-Bayesian-Computation/Sisson-Fan-Beaumont/p/book/9780367733728) (`SMCABC`)\n- [Neural Likelihood Estimation](https://arxiv.org/abs/1805.07226) (`SNL`)\n- [Surjective Neural Likelihood Estimation](https://arxiv.org/abs/2308.01054) (`SSNL`)\n- [Neural Posterior Estimation C](https://arxiv.org/abs/1905.07488) (short `SNP`)\n- [Contrastive Neural Ratio Estimation](https://arxiv.org/abs/2210.06170) (short `SNR`)\n- [Neural Approximate Sufficient Statistics](https://arxiv.org/abs/2010.10079) (`SNASS`)\n- [Neural Approximate Slice Sufficient Statistics](https://openreview.net/forum?id=jjzJ768iV1) (`SNASSS`)\n- [Flow matching posterior estimation](https://arxiv.org/abs/2305.17161) (`SFMPE`)\n- [Consistency model posterior estimation](https://arxiv.org/abs/2312.05440) (`SCMPE`)\n\nwhere the acronyms in parentheses denote the names of the methods in `sbijax`.\n\n> [!CAUTION]\n> \u26a0\ufe0f As per the LICENSE file, there is no warranty whatsoever for this free software tool. If you discover bugs, please report them.\n\n## Examples\n\nYou can find several self-contained examples on how to use the algorithms in [examples](https://github.com/dirmeier/sbijax/tree/main/examples).\n\n## Documentation\n\nDocumentation can be found [here](https://sbijax.readthedocs.io/en/latest/).\n\n## Installation\n\nMake sure to have a working `JAX` installation. Depending whether you want to use CPU/GPU/TPU,\nplease follow [these instructions](https://github.com/google/jax#installation).\n\nTo install from PyPI, just call the following on the command line:\n\n```bash\npip install sbijax\n```\n\nTo install the latest GitHub <RELEASE>, use:\n\n```bash\npip install git+https://github.com/dirmeier/sbijax@<RELEASE>\n```\n\n## Acknowledgements\n\n> [!NOTE]\n> \ud83d\udcdd The API of the package is heavily inspired by the excellent Pytorch-based [`sbi`](https://github.com/sbi-dev/sbi) package which is substantially more\nfeature-complete and user-friendly, and better documented.\n\n## Author\n\nSimon Dirmeier <a href=\"mailto:sfyrbnd @ pm me\">sfyrbnd @ pm me</a>\n",
"bugtrack_url": null,
"license": "",
"summary": "Simulation-based inference in JAX",
"version": "0.2.0",
"project_urls": {
"homepage": "https://github.com/dirmeier/sbijax"
},
"split_keywords": [
"abc",
"approximate bayesian computation",
"normalizing flows",
"simulation-based inference",
"smc-abc"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a7eacc51d1e606a1717436e917edc839be2507f84fb22f18af4659cd359c4d1e",
"md5": "a1d237ba85c1ef994b857eae2f2c5273",
"sha256": "4e1c85743767fcc1f1f6894d86c2224cfb835fa106b33421db3698b95b531ffe"
},
"downloads": -1,
"filename": "sbijax-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a1d237ba85c1ef994b857eae2f2c5273",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 57645,
"upload_time": "2024-02-29T10:46:16",
"upload_time_iso_8601": "2024-02-29T10:46:16.919671Z",
"url": "https://files.pythonhosted.org/packages/a7/ea/cc51d1e606a1717436e917edc839be2507f84fb22f18af4659cd359c4d1e/sbijax-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a6b07da8e31a6b35d86a15c53aae99c55fe809056aa8c9351549a6d341552181",
"md5": "74c71f060ab41f027b195a5cad455629",
"sha256": "2cfa323b55c2b0a465562f94ada50b91543e6b05f74baa42a63623453c880459"
},
"downloads": -1,
"filename": "sbijax-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "74c71f060ab41f027b195a5cad455629",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 37314,
"upload_time": "2024-02-29T10:46:18",
"upload_time_iso_8601": "2024-02-29T10:46:18.716641Z",
"url": "https://files.pythonhosted.org/packages/a6/b0/7da8e31a6b35d86a15c53aae99c55fe809056aa8c9351549a6d341552181/sbijax-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-29 10:46:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dirmeier",
"github_project": "sbijax",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sbijax"
}