hakaru-0.3.0: A probabilistic programming language

CopyrightCopyright (c) 2016 the Hakaru team
LicenseBSD3
Maintainerwren@community.haskell.org
Stabilityexperimental
PortabilityGHC-only
Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.Expect

Description

 

Synopsis

Documentation

normalize :: ABT Term abt => abt '[] (HMeasure a) -> abt '[] (HMeasure a) Source #

Convert an arbitrary measure into a probability measure; i.e., reweight things so that the total weight/mass is 1.

total :: ABT Term abt => abt '[] (HMeasure a) -> abt '[] HProb Source #

Compute the total weight/mass of a measure.

expect :: ABT Term abt => abt '[] (HMeasure a) -> abt '[a] HProb -> abt '[] HProb Source #

Convert a measure into its integrator. N.B., the second argument is (a representation of) a measurable function from a to 'HProb. We represent it as a binding form rather than as abt '[] (a ':-> 'HProb) in order to avoid introducing administrative redexes. We could, instead, have used a Haskell function abt '[] a -> abt '[] 'HProb@ to eliminate the administrative redexes, but that would introduce other implementation difficulties we'd rather avoid.