Memory Efficient Implementation of Probability Monads

Functional Pearl, Ken Friis Larsen · 2011

It is convenient to use monads to make a domain-specific library for working with probabilistic models and computations. However, representing the computed distributions efficiently can be challenging. The straightforward way of representing a discrete distribution as a list of possible outcomes paired with their probability can lead to a humongous representation. We show how to use a symbolic representation of distributions that allows us to compute exact expected values or make simulations, while keeping the memory usage low and without losing the nice monadic interface and algebraic properties.

Read the paper · More papers on PaperTik