Skip to main content

Truncated Marginal Neural Ratio Estimation with an inhomogeneous poisson point process cache.

Project description

PyPI version codecov 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:

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

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

  • seamless reuses simulations drawn from previous analyses, even with different priors.

  • integrates dask and zarr to make complex simulation easy.

swyft is designed to solve the Bayesian inverse problem when the user has access to a simulator that stochastically maps parameters to observational data. 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 dask simulator manager with zarr storage to simplify use with complex simulators.

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

swyft-0.3.1.post0.tar.gz (1.7 MB view hashes)

Uploaded Source

Built Distribution

swyft-0.3.1.post0-py3-none-any.whl (69.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page