[![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)
[![Documentation Status](https://readthedocs.org/projects/swyft/badge/?version=latest)](https://swyft.readthedocs.io/en/latest/?badge=latest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

**Disclaimer: swyft is research software under heavy development and still in its alpha phase. There are many rough edges, and things might break. However, the core algorithms work, and we use swyft in production for research papers. If you encounter problems, please contact the authors or submit a bug report.**

# SWYFT

<p align="center">
Neural nested marginal posterior estimation
</p>

*Cursed by the dimensionality of your nuisance space? Wasted by Markov
chains that reject your simulations? Exhausted from messing with
simplistic models, because your inference algorithm cannot handle the
truth? Try swyft for some pain relief.*

For a quickstart guide, documentation, and more see
[readthedocs](https://swyft.readthedocs.io/en/latest/).  

A simple example is avaliable on [google colab](https://colab.research.google.com/github/undark-lab/swyft/blob/master/notebooks/Quickstart.ipynb).

## Installation

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

`pip install swyft`

## Relevant Tools

swyft exists in an ecosystem of posterior estimators. The project [sbi](https://github.com/mackelab/sbi) is particularly relevant as it is a collection of likelihood-free / simulator-based methods.
