Home

Awesome

EffPPL

We present EffPPL, a shallowly embedded domain-specific probabilistic programming library in Multicore OCaml made using effect handlers. EffPPL has the capability to perform approximate Bayesian inference for models using continuous random variables. EffPPL uses the Hamiltonian Monte Carlo for performing the inference.

Installation Instructions

  1. Clone the repo
  2. In multicore Ocaml ensure that the following are installed:-
  1. Run dune build effppl.a
  2. You can then run the PPL library.

Tour of repository

The main inference algorithm can be found in lib/hmc.ml, this also includes the effect based algorithmic diffrentiation. For examples on how to use the library the lib/models can be checked. The results obtained by the models can be found in results/ folder. The code to compare the EffPPL code to Stan code can be seen in stan/ folder. Preliminary and Final Reports made for the UGRC can be found in the reports folder.

Some Results

Here we show some results of the EffPPL library for a more detailed results page do kindly check the results folder.

Linear Regression

We can see in figure below a plot showing sampled lines and the mean line. The black line indicates the line with the mean slope and constant. While the other faint blue lines indicate samples that PPL drew.

Binary Classification

Here to simulate a simple linear classifier we say that a correctly classified point is much more likelier than a wrongly classified point.

Auto-Regressive Models

We use the autoregressive model described here. We generate data using alpha = 0.5 and beta = 1.03. As can be seen we are able to approximate both to a considerable extent.

Alpha Predictions

Beta Predictions