rgrosse / AutoBDMC

Automated bidirectional Monte Carlo for probabilistic programming languages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutoBDMC

AutoBDMC is a tool based on bidirectional Monte Carlo to accurately evaluate and bound log likelihoods of synthetic data via annealed importance sampling in an automated fashion by integrating it with probabilisitic programming languages, such as Stan and WebPPL.

This repository contains an implementation of this tool in Stan (and WebPPL), as well as experiments that validate the use of this tool and demonstrate scientific findings produced by it.

Instructions

Installation

Run: make install

This installs WebPPL. Stan need not be installed as it compiles on the go.

Experiments

Each experiment is represented by a subfolder in the "experiments" folder. To run an experiment from scratch, run

bash experiments/<EXP_NAME>/scripts/main.sh [--run] [--parallel] [--clean]
  1. --run
    To actually run the experiment.
  2. --parallel
    An experiment consists of a set of independent jobs, which are run serially by default. If you have access to a CPU cluster with GNU parallel installed, you can use this flag to parallelize the jobs.
  3. --clean
    The script generates data files, exact-sample files, job lists, results and plots. Use this flag to delete all generated files and clean the directory, in order to re-run the experiment. Caution: all unsaved work will be lost.

Example: bash experiments/mf/scripts/main.sh --run --parallel

After the script finishes execution, generated plots will be available in experiments/EXP_NAME/plots.

About

Automated bidirectional Monte Carlo for probabilistic programming languages.


Languages

Language:Python 50.7%Language:Shell 39.3%Language:Stan 9.4%Language:Makefile 0.7%