hakaru-0.1.3: A probabilistic programming embedded DSL

Safe HaskellSafe-Inferred

Language.Hakaru.Metropolis

Documentation

type DistVal = DynamicSource

data XRP whereSource

Constructors

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

unXRP :: Typeable a => XRP -> Maybe (Density a, Dist a)Source

type Visited = BoolSource

type Observed = BoolSource

type Subloc = IntSource

data DBEntry Source

Constructors

DBEntry 

Fields

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

data SamplerState g whereSource

Constructors

S :: Database -> !(LL, LL) -> [Cond] -> g -> SamplerState g 

Fields

ldb :: Database
 
llh2 :: !(LL, LL)
 
cnds :: [Cond]
 
seed :: g
 

type Sampler a = forall g. RandomGen g => SamplerState g -> (a, SamplerState g)Source

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

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

newtype Measure a Source

Constructors

Measure 

Fields

unMeasure :: Name -> Sampler a
 

Instances

Monad Measure 
Typeable1 Measure 

updateXRP :: Typeable a => Name -> Cond -> Dist a -> Sampler aSource

updateLogLikelihood :: RandomGen g => LL -> LL -> SamplerState g -> (LL, LL)Source

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

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

conditioned :: Typeable a => Dist a -> Measure aSource

unconditioned :: Typeable a => Dist a -> Measure aSource

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

traceUpdate :: RandomGen g => Measure a -> Database -> [Cond] -> g -> (a, Database, LL, LL, LL, g)Source

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

resample :: RandomGen g => Name -> Database -> Observed -> XRP -> g -> (Database, LL, LL, LL, g)Source

transition :: (Typeable a, RandomGen g) => Measure a -> [Cond] -> a -> Database -> LL -> g -> [a]Source

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

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