Metadata-Version: 2.1
Name: swyft
Version: 0.2.1
Summary: Nested ratio estimation and inhomogeneous poisson point process sample caching for simulator efficient marginal posterior estimation.
Home-page: https://github.com/undark-lab/swyft
License: MIT License
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Environment :: GPU
Classifier: Operating System :: OS Independent
Classifier: Operating System :: POSIX
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch (>=1.4.0)
Requires-Dist: numpy (>=1.18.1)
Requires-Dist: zarr (>=2.5.0)
Requires-Dist: numcodecs (>=0.7.2)
Requires-Dist: tqdm (>=4.46.0)
Requires-Dist: scipy (>=1.4.1)
Requires-Dist: matplotlib (>=3.1.3)
Requires-Dist: scikit-learn (>=0.23.2)
Requires-Dist: dask[complete] (>=2021.3.0)
Requires-Dist: pandas
Requires-Dist: seaborn
Requires-Dist: toolz
Requires-Dist: fasteners (==0.15)
Provides-Extra: dev
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: black ; extra == 'dev'
Requires-Dist: isort ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'

[![PyPI version](https://badge.fury.io/py/swyft.svg)](https://badge.fury.io/py/swyft)
[![Tests](https://github.com/undark-lab/swyft/actions/workflows/tests.yml/badge.svg)](https://github.com/undark-lab/swyft/actions)
[![Syntax](https://github.com/undark-lab/swyft/actions/workflows/syntax.yml/badge.svg)](https://github.com/undark-lab/swyft/actions)
[![codecov](https://codecov.io/gh/undark-lab/swyft/branch/master/graph/badge.svg?token=E253LRJWWE)](https://codecov.io/gh/undark-lab/swyft)
[![Documentation Status](https://readthedocs.org/projects/swyft/badge/?version=latest)](https://swyft.readthedocs.io/en/latest/?badge=latest)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/undark-lab/swyft/blob/master/CONTRIBUTING.md)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Check out the quickstart notebook --> [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/undark-lab/swyft/blob/master/notebooks/Quickstart.ipynb)

**This is a beta release. If you encounter problems, please contact the authors or submit a bug report.**

# SWYFT

<p align="center">
Truncated marginal neural ratio estimation
</p>

## Installation

**After installing [pytorch](https://pytorch.org/get-started/locally/)**, please run the command:

`pip install swyft`

## Documentation

Detailed documentation can be found on [readthedocs](https://swyft.readthedocs.io/en/latest/).

## Instruction videos

- [1 - Linear regression with swyft](https://www.loom.com/share/cefac9e4e84d482c89c5281b90121974)
- [2 - ConvNets, parameter regression and swyft](https://www.loom.com/share/1fc4785159bf4f0081e59693133a5ad3)
- ...more to come...

### Academic videos

- [Truncated Marginal Neural Ratio Estimation](https://www.youtube.com/watch?v=euUxDdB5XY8)

## Related tools and repositories

- Our repository applying swyft to benchmarks and example inference problems is available at [tmnre](https://github.com/bkmi/tmnre).
- [sbi](https://github.com/mackelab/sbi) is a collection of likelihood-free / simulator-based methods


## Citing

If you use *swyft* in scientific publications, please cite one or both:

*Truncated Marginal Neural Ratio Estimation*. Benjamin Kurt Miller, Alex Cole, Patrick Forré, Gilles Louppe, Christoph Weniger. https://arxiv.org/abs/2107.01214

*Simulation-efficient marginal posterior estimation with swyft: stop wasting your precious time*. Benjamin Kurt Miller, Alex Cole, Gilles Louppe, Christoph Weniger. https://arxiv.org/abs/2011.13951


