mcmc-0.8.1.0: Sample from a posterior using Markov chain Monte Carlo
Copyright2021 Dominik Schrempf
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mcmc.Monitor.ParameterBatch

Description

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

A batch monitor prints summary statistics of a parameter collected over a specific number of last iterations. The functions provided in this module calculate the mean of the monitored parameter. However, custom batch monitors can use more complex functions.

Synopsis

Batch parameter monitors

data MonitorParameterBatch a Source #

Instruction about a parameter to monitor via batch means. Usually, the monitored parameter is averaged 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

Batch monitors may be slow because the monitored parameter has to be extracted from the state for each iteration.

Constructors

MonitorParameterBatch 

Fields

Instances

Instances details
Contravariant MonitorParameterBatch Source # 
Instance details

Defined in Mcmc.Monitor.ParameterBatch

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

This is an infix alias for contramap.

monitorBatchMean Source #

Arguments

:: Real a 
=> String

Name.

-> MonitorParameterBatch a 

Batch mean monitor.

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

monitorBatchMeanF Source #

Arguments

:: Real a 
=> String

Name.

-> MonitorParameterBatch a 

Batch mean monitor.

Print the mean with full precision.

monitorBatchMeanS Source #

Arguments

:: Real a 
=> String

Name.

-> MonitorParameterBatch a 

Batch mean monitor.

Print the real float parameters such as Double with scientific notation.