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.Algorithm

Description

Creation date: Mon Nov 16 14:37:11 2020.

Synopsis

Documentation

class Algorithm a where Source #

Class for algorithms used by MCMC samplers.

Methods

aName :: a -> String Source #

Name.

aIteration :: a -> Int Source #

Current iteration.

aIsInvalidState :: a -> Bool Source #

Check if the current state is invalid. A state is invalid if the posterior probability is positive or negative infinite or NaN.

aIterate :: IterationMode -> ParallelizationMode -> a -> IO a Source #

Sample the next state.

aAutoTune :: TuningType -> Int -> a -> IO a Source #

Auto tune all proposals over the last N iterations.

NOTE: Computation in the IO Monad is necessary because the trace is mutable.

aResetAcceptance :: ResetAcceptance -> a -> a Source #

Reset acceptance counts.

aCleanAfterBurnIn :: TraceLength -> a -> IO a Source #

Clean after burn in. In particular, this is used to reduce the length of the trace, if required.

aSummarizeCycle :: IterationMode -> a -> ByteString Source #

Summarize the proposals in the cycle.

aOpenMonitors :: AnalysisName -> ExecutionMode -> a -> IO a Source #

Open required monitor files and setup corresponding file handles.

aExecuteMonitors Source #

Arguments

:: Verbosity 
-> UTCTime

Starting time.

-> Int

Total number of iterations including burn in.

-> a 
-> IO (Maybe ByteString) 

Execute file monitors and possibly return a monitor string to be written to the standard output and the log file.

aStdMonitorHeader :: a -> ByteString Source #

Header of monitor to standard output.

aCloseMonitors :: a -> IO a Source #

Close monitor files and remove the file handles.

aSave :: AnalysisName -> a -> IO () Source #

Save analysis.

Instances

Instances details
ToJSON a => Algorithm (MC3 a) Source # 
Instance details

Defined in Mcmc.Algorithm.MC3

ToJSON a => Algorithm (MHG a) Source # 
Instance details

Defined in Mcmc.Algorithm.MHG