Skip to content

tweag/monad-bayes

Repository files navigation

monad-bayes

A library for probabilistic programming in Haskell. The emphasis is on composition of inference algorithms, and is implemented in terms of monad transformers.

See the documentation for a quick-start user guide and a reference overview of how it all works.

Created by Adam Scibior (@adscib), documentation by Reuben, maintained by Tweag I/O.

Project status

Now that monad-bayes has been released on Hackage, we will focus on improving documentation, adding a variety of applications, improving the API, and making inference more easily customizable.

Background

The basis for the code in this repository is the ICFP 2018 paper [2]. For the code associated with the Haskell2015 paper [1], see the haskell2015 tag.

[1] Adam M. Ścibior, Zoubin Ghahramani, and Andrew D. Gordon. 2015. Practical probabilistic programming with monads. In Proceedings of the 2015 ACM SIGPLAN Symposium on Haskell (Haskell ’15), Association for Computing Machinery, Vancouver, BC, Canada, 165–176.

[2] Adam M. Ścibior, Ohad Kammar, and Zoubin Ghahramani. 2018. Functional programming for modular Bayesian inference. In Proceedings of the ACM on Programming Languages Volume 2, ICFP (July 2018), 83:1–83:29.

[3] Adam M. Ścibior. 2019. Formally justified and modular Bayesian inference for probabilistic programs. Thesis. University of Cambridge.

Hacking

  1. Install stack by following these instructions.

  2. Clone the repository using one of these URLs:

    git clone [email protected]:tweag/monad-bayes.git
    git clone https://github.com/tweag/monad-bayes.git
    

Now you can use stack build, stack test and stack ghci.

To use the notebooks in the notebooks directory, you will first need nix. Then:

  1. Run nix develop --system x86_64-darwin --extra-experimental-features nix-command --extra-experimental-features flakes

  2. This should open a shell, from which you can run jupyter-lab to load the notebooks

About

A library for probabilistic programming in Haskell.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 26