mcmc-0.2.4: Sample from a posterior using Markov chain Monte Carlo

Copyright(c) Dominik Schrempf 2020
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Mcmc.Monitor.ParameterBatch

Contents

Description

Creation date: Fri May 29 11:11:49 2020.

Batch mean monitors.

Synopsis

Batch parameter monitors

data MonitorParameterBatch a Source #

Instruction about a parameter to monitor via batch means. Usually, the monitored parameter is average over the batch size. However, arbitrary functions performing more complicated analyses on the states in the batch can be provided.

Convert a batch monitor from one data type to another with '(>$<)'.

For example, batch monitor the mean of the first entry of a tuple:

mon = fst >$< monitorBatchMean

XXX: Batch monitors are slow at the moment because the monitored parameter has to be extracted from the state for each iteration.

Constructors

MonitorParameterBatch 

Fields

  • mbpName :: String

    Name of batch monitored parameter.

  • mbpFunc :: [a] -> Builder

    Instruction about how to extract the batch mean from the trace.

(>$<) :: Contravariant f => (a -> b) -> f b -> f a infixl 4 #

This is an infix alias for contramap.

(@#) :: (b -> a) -> MonitorParameterBatch a -> MonitorParameterBatch b Source #

Deprecated: Superseded by the contravariant instance, use '(>$<)'.

Convert a batch parameter monitor from one data type to another.

For example, to batch monitor the mean of the first entry of a tuple:

mon = fst @# monitorBatchMean

monitorBatchMean Source #

Arguments

:: Real a 
=> String

Name.

-> MonitorParameterBatch a 

Batch monitor. Print the mean with eight decimal places (half precision).

monitorBatchMeanF Source #

Arguments

:: Real a 
=> String

Name.

-> MonitorParameterBatch a 

Batch monitor. Print the mean with full precision computing the shortest string of digits that correctly represent the number.

monitorBatchMeanE Source #

Arguments

:: Real a 
=> String

Name.

-> MonitorParameterBatch a 

Batch monitor real float parameters such as Double with scientific notation and eight decimal places.

monitorBatchCustom Source #

Arguments

:: String

Name.

-> ([a] -> a)

Function to calculate the batch mean.

-> (a -> Builder)

Custom builder.

-> MonitorParameterBatch a 

Batch monitor parameters with custom lens and builder.