Skip to main content

Swyft

https://raw.githubusercontent.com/undark-lab/swyft/v0.4.1/docs/source/_static/img/swyft_logo_wide.png

Swyft is a system for scientific simulation-based inference at scale.

PyPI version codecov https://joss.theoj.org/papers/10.21105/joss.04205/status.svg https://zenodo.org/badge/DOI/10.5281/zenodo.5752734.svg

Swyft is the official implementation of Truncated Marginal Neural Ratio Estimation (TMNRE), a hyper-efficient, simulation-based inference technique for complex data and expensive simulators.

Swyft in action

https://raw.githubusercontent.com/undark-lab/swyft/v0.4.1/docs/source/_static/img/SBI-curve.gif
  • Swyft makes it convenient to perform Bayesian or Frequentist inference of hundreds, thousands or millions of parameter posteriors by constructing optimal data summaries.

  • To this end, Swyft estimates likelihood-to-evidence ratios for arbitrary marginal posteriors; they typically require fewer simulations than the corresponding joint.

  • Swyft performs targeted inference by prior truncation, combining simulation efficiency with empirical testability.

  • Swyft is based on stochastic simulators, which map parameters stochastically to observational data. Swyft makes it convenient to define such simulators as graphical models.

  • In scientific settings, a cost-benefit analysis often favors approximating the posterior marginality; swyft provides this functionality.

  • The package additionally implements our prior truncation technique, routines to empirically test results by estimating the expected coverage, and a simulator manager with zarr storage to simplify use with complex simulators.

Papers using Swyft/TMNRE

2021

2022

2023

Further information

Swyft history

Relevant packages

  • sbi is a collection of simulation-based inference methods. Unlike Swyft, the repository does not include our truncation scheme nor marginal estimation of posteriors.

  • lampe is an implementation of amoritzed simulation-based inference methods aimed at simulation-based inference researchers due to its flexibility.

Metadata

Release files for swyft 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swyft 0.4.5
File Size Uploaded Provenance Actions
swyft-0.4.5.tar.gz 11.4 MB Without provenance Details for swyft-0.4.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swyft 0.4.5
File Interpreter ABI Platform Actions
swyft-0.4.5-py3-none-any.whl Python 3 none any Details for swyft-0.4.5-py3-none-any.whl

Total release size: 11.5 MB

Release files / swyft-0.4.5.tar.gz

Download URL swyft-0.4.5.tar.gz
Size 11.4 MB
Tags Source
SHA-256 checksum
How to use checksums
59b7c8f846fa858c20b15b3fdc7555386a644ef40fb76aedd60277448f61ddf4
BLAKE2b-256 checksum
How to use checksums
2252bb357be716568e8651051c3ae12450b58fffcebaa1d53cd9fa12fa078f87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / swyft-0.4.5-py3-none-any.whl

Download URL swyft-0.4.5-py3-none-any.whl
Size 52.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b323f2fba2cae1d33f3900d3b081beb72489a76b8bf7838e3b585ea058413bc
BLAKE2b-256 checksum
How to use checksums
445ebd80729741be37df4f31bbcb915c57e0678ee66c53e8f83774de79a576a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for swyft 0.4.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page