Skip to content
/ OwlPPL Public

Final Year Project - A probabilisitic programming language in OCaml

Notifications You must be signed in to change notification settings

anik545/OwlPPL

Repository files navigation

OwlPPL

A universal probabilistic programming language and accompanying dissertation written for my final year project

Requirements

  • Ocaml 4.08
  • Opam

Build + Install

git clone https://github.com/anik545/OwlPPL
opam install OwlPPL/ppl

Usage

Simple coin example (in ppl/bin/models/single_coin.ml) - represents flipping a coin 10 times, observing 9 heads, and working out the posterior distribution over the weight of the coin.

open Ppl

let coin_model = 
  let* coinweight = continuous_uniform 0. 1. in
  observe 9 Primitive.(binomial 10 coinweight)
  (return coinweight)
  
let mean = sample_mean ~n:10000 (infer coin_model (MH(1000))) (*0.833*)

Documentation

Build locally using dune build @doc in ppl

https://anik545.github.io/OwlPPL/

About

Final Year Project - A probabilisitic programming language in OCaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published