mcmc-0.1.3: 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 HaskellSafe
LanguageHaskell2010

Mcmc.Monitor.ParameterBatch

Description

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

Batch mean monitors.

Synopsis

Documentation

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.

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.

monitorBatchMeanInt Source #

Arguments

:: Integral b 
=> String

Name of monitor.

-> Lens' a b

Instruction about which parameter to monitor.

-> MonitorParameterBatch a 

Batch monitor integral parameters such as Int. Print the mean with eight decimal places (half precision).

monitorBatchMeanIntF Source #

Arguments

:: Integral b 
=> String

Name of monitor.

-> Lens' a b

Instruction about which parameter to monitor.

-> MonitorParameterBatch a 

Batch monitor integral parameters such as Int. Print the mean with full precision.

monitorBatchMeanRealFloat Source #

Arguments

:: RealFloat b 
=> String

Name of monitor.

-> Lens' a b

Instruction about which parameter to monitor.

-> MonitorParameterBatch a 

Batch monitor real float parameters such as Double with eight decimal places (half precision).

monitorBatchMeanRealFloatF Source #

Arguments

:: RealFloat b 
=> String

Name of monitor.

-> Lens' a b

Instruction about which parameter to monitor.

-> MonitorParameterBatch a 

Batch monitor real float parameters such as Double with full precision.

monitorBatchMeanRealFloatS Source #

Arguments

:: RealFloat b 
=> String

Name of monitor.

-> Lens' a b

Instruction about which parameter to monitor.

-> MonitorParameterBatch a 

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

monitorBatchCustom Source #

Arguments

:: String

Name of monitor.

-> Lens' a b

Instruction about which parameter to monitor.

-> ([b] -> b)

Function to calculate the batch mean.

-> (b -> Builder)

Custom builder.

-> MonitorParameterBatch a 

Batch monitor parameters with custom lens and builder.