Skip to main content

Fast, parallel and lightweight simulation-based inference in JAX.

Project description

sbiax

Fast, lightweight and parallel simulation-based inference.

Your image description

sbiax is a lightweight library for simulation-based inference (SBI) with a fixed grid of simulations.

[!WARNING] :building_construction: Note this repository is under construction, expect changes. :building_construction:


Design

In a typical inference problem the data likelihood is unknown. Using density-estimation SBI, we can proceed by

  • simulating a set of data and model parameters ${(\boldsymbol{\xi}, \boldsymbol{\pi})_0, ..., (\boldsymbol{\xi}, \boldsymbol{\pi})_N}$,
  • obtaining a measurement $\hat{\boldsymbol{\xi}}$,
  • compressing the simulations and the measurements - usually with a neural network or linear compression - to a set of summaries ${(\boldsymbol{x}, \boldsymbol{\pi})_0, ..., (\boldsymbol{x}, \boldsymbol{\pi})_N}$ and $\hat{\boldsymbol{x}}$,
  • fitting an ensemble of normalising flow or similar density estimation algorithms (e.g. a Gaussian mixture model),
  • the optional optimisation of the parameters for the architecture and fitting hyperparameters of the algorithms,
  • sampling the ensemble posterior (using an MCMC sampler if the likelihood is fit directly) conditioned on the datavector to obtain parameter constraints on the parameters of a physical model, $\boldsymbol{\pi}$.

sbiax is a code for implementing each of these steps.


Usage

Install via

pip install sbiax

and have a look at examples.


Contributing

Want to add something? See CONTRIBUTING.md.


Citation

If you found this library to be useful in academic work, please cite:

@misc{homer2024simulationbasedinferencedodelsonschneidereffect,
      title={Simulation-based inference has its own Dodelson-Schneider effect (but it knows that it does)}, 
      author={Jed Homer and Oliver Friedrich and Daniel Gruen},
      year={2024},
      eprint={2412.02311},
      archivePrefix={arXiv},
      primaryClass={astro-ph.CO},
      url={https://arxiv.org/abs/2412.02311}, 
}

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

sbiax-0.0.54.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

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

sbiax-0.0.54-py3-none-any.whl (4.1 MB view details)

Uploaded Python 3

File details

Details for the file sbiax-0.0.54.tar.gz.

File metadata

  • Download URL: sbiax-0.0.54.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for sbiax-0.0.54.tar.gz
Algorithm Hash digest
SHA256 a5dc0fb189fa9cbb0e4c9f47bab444da525c15fc443fa5610d1c1265be4555e9
MD5 ee9699b83a9a12635d658c49b06f803f
BLAKE2b-256 5476707765b61729173fdf057b95b3be706ff5054f783ee1dbdafde96ac2fc3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for sbiax-0.0.54.tar.gz:

Publisher: publish.yml on homerjed/sbiax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sbiax-0.0.54-py3-none-any.whl.

File metadata

  • Download URL: sbiax-0.0.54-py3-none-any.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for sbiax-0.0.54-py3-none-any.whl
Algorithm Hash digest
SHA256 34596f7319088eff293a4a12c8bc544983d1adeb24374d15ea0b1c76bd97245d
MD5 8ba4b80f7409c095fe75a298fe65f717
BLAKE2b-256 f6f7e3280b0a4566d2440060fe725022ef4bc78f5d0acfe584dea6bfe31e4b53

See more details on using hashes here.

Provenance

The following attestation bundles were made for sbiax-0.0.54-py3-none-any.whl:

Publisher: publish.yml on homerjed/sbiax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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