Measures are a type constructor . They map subsets of the event space to :
Measures are functors: if we have a measure of type and a function then we can define an object of type .
Under certain conditions, measures have a density .
We can also define .
import aeppl.random as ar
mu = at.scalar()
sigma = at.scalar()
x = ar.normal(mu, sigma)
y = ar.halfnormal(x, 1.)In this case the first ar.normal is a function , and the second .
- We pass from , a probability measure over probability measures to a probabilty measures by defining an evaluation map , acts by integrating or averaging (or sampling?).
- We define a map for passing from a space to a probability measure over , typically by sending to the Dirac measure over .
- We define an assignment on maps so that a map of spaces extends to a map of spaces of probability measures , this takes the form of the pushforward definition.
References
Pratical implementations
- The probability monad and why it’s important for data science
- Probability Monads from scratch in 100 lines of Haskell
- Practical probabilistic programming with monads