monad-bayes-1.1.0: A library for probabilistic programming.
Copyright(c) Adam Scibior 2015-2020
LicenseMIT
Maintainerleonhard.markert@tweag.io
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Bayes.Traced.Dynamic

Description

 
Synopsis

Documentation

data Traced m a Source #

A tracing monad where only a subset of random choices are traced and this subset can be adjusted dynamically.

Instances

Instances details
MonadTrans Traced Source # 
Instance details

Defined in Control.Monad.Bayes.Traced.Dynamic

Methods

lift :: Monad m => m a -> Traced m a #

Monad m => Applicative (Traced m) Source # 
Instance details

Defined in Control.Monad.Bayes.Traced.Dynamic

Methods

pure :: a -> Traced m a #

(<*>) :: Traced m (a -> b) -> Traced m a -> Traced m b #

liftA2 :: (a -> b -> c) -> Traced m a -> Traced m b -> Traced m c #

(*>) :: Traced m a -> Traced m b -> Traced m b #

(<*) :: Traced m a -> Traced m b -> Traced m a #

Monad m => Functor (Traced m) Source # 
Instance details

Defined in Control.Monad.Bayes.Traced.Dynamic

Methods

fmap :: (a -> b) -> Traced m a -> Traced m b #

(<$) :: a -> Traced m b -> Traced m a #

Monad m => Monad (Traced m) Source # 
Instance details

Defined in Control.Monad.Bayes.Traced.Dynamic

Methods

(>>=) :: Traced m a -> (a -> Traced m b) -> Traced m b #

(>>) :: Traced m a -> Traced m b -> Traced m b #

return :: a -> Traced m a #

MonadDistribution m => MonadDistribution (Traced m) Source # 
Instance details

Defined in Control.Monad.Bayes.Traced.Dynamic

MonadFactor m => MonadFactor (Traced m) Source # 
Instance details

Defined in Control.Monad.Bayes.Traced.Dynamic

Methods

score :: Log Double -> Traced m () Source #

MonadMeasure m => MonadMeasure (Traced m) Source # 
Instance details

Defined in Control.Monad.Bayes.Traced.Dynamic

hoist :: (forall x. m x -> m x) -> Traced m a -> Traced m a Source #

marginal :: Monad m => Traced m a -> m a Source #

Discard the trace and supporting infrastructure.

freeze :: Monad m => Traced m a -> Traced m a Source #

Freeze all traced random choices to their current values and stop tracing them.

mhStep :: MonadDistribution m => Traced m a -> Traced m a Source #

A single step of the Trace Metropolis-Hastings algorithm.

mh :: MonadDistribution m => Int -> Traced m a -> m [a] Source #

Full run of the Trace Metropolis-Hastings algorithm with a specified number of steps.