Welcome to Monad-Bayes¶
Monad-Bayes is a library for probabilistic programming written in Haskell.
Define distributions as programs
Integrate with Haskell code like this because Monad-Bayes is just a library, not a separate language
model is a mixture of Gaussians. Its type
Distribution Double represents a distribution over reals.
image is a program too: as its type shows, it is a distribution over plots. In particular, plots that arise from forming a 200 bin histogram out of 100000 independent identically distributed (iid) draws from
To sample from
image, we simply write
sampler image, with the result shown below: