idontgetoutmuch / lazyppl

MIT License
2 stars 0 forks source link

lazyppl

This provides a Metropolis-Hastings implementation in Haskell that works with lazy programs, together with some examples.

Various examples are given in Literate Haskell at https://lazyppl.bitbucket.io/.

To try the different examples, use stack run wiener-exe and so on. The source is in src/ .

Laziness appears to be a useful method for specifying non-parametric models. For example, we often use processes or infinite dimensional functions, and this is fine because only finite parts are explored in practice.

The aim of this implementation is to demonstrate that it's possible to have first-class lazy structures in probabilistic programming. For example, we have first-class

Examples

Wiener process regression

Poisson-split piecewise linear regression

Dirichlet process clustering

Program induction

Library

Installation

The system uses Haskell stack. You need to install stack first if you want to use the system in the standard way.

To build, type stack build. This may take some time (>1 hour) if it is your first time ever using stack.

To run, type stack run wiener-exe or stack run regression-exe or stack run clustering-exe, or explore with stack ghci.