Probabilistic Functional Programming

From HaskellWiki
Revision as of 22:15, 27 November 2016 by Ivarru (talk | contribs) (→‎See also: Added reference to Practical Probabilistic Programming with Monads)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Probabilistic functional programming is a library for discrete random variables in terms of their distribution. A distribution represent the outcome of a probabilistic event as a collection of all possible values, tagged with their likelihood. It turns out that random variables establish a monad, namely a list monad where all items are equipped with a probability. A nice aspect of this system is that simulations can be specified independently from their method of execution. That is, we can either fully simulate or randomize any simulation without altering the code which defines it. Examples include dice games, the Monty Hall paradoxon and others.

Version maintained by Henning Thielemann:

Future

Currently it is annoying that the distribution monad is not able to accumulate the probabilities of equal elements automatically. Thus you must make this manually, whenever you feel that it is necessary. This is due to a restriction of the monad class, that does not allow restrictions of the types of the monadic result. However using the RMonad we could implement the desired functionality.

See also