Repository for running simulation based inference (SBI) pipeline on the simple Lorenz system. The Lorenz system has 3 parameters (
The figure shows an example inferred posterior. The real parameters are:
Create virtual environment
python venv -m env_name
Activate environment
source env_name/bin/activate
Install requirements
pip install -r requirements.txt
The full pipeline for inference is given here:
To run simulations in parallel on multiple CPU cores run the following code:
mpirun -n num_cores python cpu_sims.py
To train a neural density estimator on the CPU run the following lineL
python3 train.py --device cpu
To train on GPU run:
python3 train.py --device cuda
The following line will generate a pairplot figure of the full posterior given the observation statistics of the Lorenz system with parameters:
python3 posterior.py
Many settings can be altered. This repository is made for educational purposes and serves as a starting point to implement your own models.