monad-bayes: A library for probabilistic programming.

[ library, mit, program, statistics ] [ Propose Tags ] [ Report a vulnerability ]

A library for probabilistic programming using probability monads. The emphasis is on composition of inference algorithms implemented in terms of monad transformers. Please refer to the documentation for a quick-start user guide and a reference overview of how it all works" and the included README.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
dev

Turn on development settings.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 1.0.0, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.3.0.1, 1.3.0.2, 1.3.0.3, 1.3.0.4
Change log CHANGELOG.md
Dependencies abstract-par (>=0.3 && <0.4), base (>=4.15 && <4.21), brick (>=2.3.1 && <2.6), containers (>=0.6 && <0.8), criterion (>=1.5 && <1.7), directory (>=1.3 && <1.4), foldl (>=1.4 && <1.5), free (>=5.2 && <5.3), histogram-fill (>=0.9 && <0.10), hspec (>=2.10 && <2.12), ieee754 (>=0.8.0 && <0.9), integration (>=0.2 && <0.3), lens (>=5.2 && <5.4), linear (>=1.22 && <1.24), log-domain (>=0.12 && <0.14), math-functions (>=0.2.1 && <0.4), matrix (>=0.3 && <0.4), monad-bayes, monad-coroutine (>=0.9.0 && <0.10), monad-extras (>=0.6 && <0.7), mtl (>=2.2.2 && <2.4), mwc-random (>=0.13.6 && <0.16), optparse-applicative (>=0.17 && <0.19), pipes (>=4.3 && <4.4), pretty-simple (>=4.1 && <4.2), primitive (>=0.8 && <0.10), process (>=1.6 && <1.7), QuickCheck (>=2.14 && <2.16), random (>=1.2 && <1.3), safe (>=0.3.17 && <0.4), scientific (>=0.3 && <0.4), statistics (>=0.14.0 && <0.17), text (>=1.2 && <2.2), time (>=1.9 && <1.13), transformers (>=0.5.6 && <0.7), typed-process (>=0.2 && <0.3), vector (>=0.12.0 && <0.14), vty (>=6.1 && <6.3), vty-unix (>=0.2.0.0 && <0.3) [details]
Tested with ghc ==9.0.2 || ==9.2.7 || ==9.4.5 || ==9.6.4 || ==9.8.2 || ==9.10.1
License MIT
Copyright 2015-2020 Adam Scibior
Author Adam Scibior <adscib@gmail.com>
Maintainer dominic.steinitz@tweag.io
Category Statistics
Home page http://github.com/tweag/monad-bayes#readme
Bug tracker https://github.com/tweag/monad-bayes/issues
Source repo head: git clone https://github.com/tweag/monad-bayes.git
Uploaded by turion at 2024-11-10T09:06:24Z
Distributions Stackage:1.3.0.4
Reverse Dependencies 1 direct, 0 indirect [details]
Executables example
Downloads 1610 total (75 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-11-10 [all 1 reports]

Readme for monad-bayes-1.3.0.4

[back to package description]

Monad-Bayes

A library for probabilistic programming in Haskell.

See the docs for a user guide, notebook-style tutorials, an example gallery, and a detailed account of the implementation.

Created by Adam Scibior (@adscib), documentation, website and newer features by Reuben, maintained by Tweag.

Project status

Now that monad-bayes has been released on Hackage, and the documentation and the API has been updated, we will focus on adding new features. See the Github issues to get a sense of what is being prepared, and please feel free to make requests.

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 git@github.com: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 view the notebooks, go to the website. To use the notebooks interactively:

  1. Compile the source: stack build
  2. If you do not have nix install it.
  3. Run nix develop --system x86_64-darwin --extra-experimental-features nix-command --extra-experimental-features flakes - this should open a nix shell. For Linux use x86_64-linux for --system option instead.
  4. Run jupyter-lab from the nix shell to load the notebooks.

Your mileage may vary.