hakaru-0.1.4: A probabilistic programming embedded DSL

Safe HaskellNone
LanguageHaskell2010

Language.Hakaru.Metropolis

Documentation

data XRP where Source

Constructors

XRP :: Typeable e => (Density e, Dist e) -> XRP 

type LL2 = (LL, LL) Source

type Name = [Subloc] Source

data DBEntry Source

Constructors

DBEntry 

Fields

xrp :: XRP
 
llhd :: LL
 
vis :: Visited
 
observed :: Observed
 

data SamplerState where Source

Constructors

S :: Database -> !LL2 -> [Cond] -> SamplerState 

Fields

ldb :: Database
 
llh2 :: !LL2
 
cnds :: [Cond]
 

type Sampler a = PrimMonad m => SamplerState -> PRNG m -> m (a, SamplerState) Source

sbind :: Sampler a -> (a -> Sampler b) -> Sampler b Source

smap :: (a -> b) -> Sampler a -> Sampler b Source

newtype Measure a Source

Constructors

Measure 

Fields

unMeasure :: Name -> Sampler a
 

condition :: Eq b => Measure (a, b) -> b -> Measure a Source

bind :: Measure a -> (a -> Measure b) -> Measure b Source

sapp :: Sampler (a -> b) -> Sampler a -> Sampler b Source

app :: Measure (a -> b) -> Measure a -> Measure b Source

run :: Measure a -> [Cond] -> IO (a, Database, LL) Source

traceUpdate :: PrimMonad m => Measure a -> Database -> [Cond] -> PRNG m -> m (a, Database, LL, LL, LL) Source

initialStep :: Measure a -> [Cond] -> PRNG IO -> IO (a, Database, LL, LL, LL) Source

resample :: PrimMonad m => Name -> Database -> Observed -> XRP -> PRNG m -> m (Database, LL, LL, LL) Source

transition :: Typeable a => Measure a -> [Cond] -> a -> Database -> LL -> PRNG IO -> IO [a] Source

mcmc :: Typeable a => Measure a -> [Cond] -> IO [a] Source

sample :: Typeable a => Measure a -> [Cond] -> IO [(a, Double)] Source