Copyright | 2021 Dominik Schrempf |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creation date: Mon Nov 16 14:37:11 2020.
Synopsis
- class Algorithm a where
- aName :: a -> String
- aIteration :: a -> Int
- aIsInvalidState :: a -> Bool
- aIterate :: IterationMode -> ParallelizationMode -> a -> IO a
- aAutoTune :: TuningType -> Int -> a -> IO a
- aResetAcceptance :: ResetAcceptance -> a -> a
- aCleanAfterBurnIn :: TraceLength -> a -> IO a
- aSummarizeCycle :: IterationMode -> a -> ByteString
- aOpenMonitors :: AnalysisName -> ExecutionMode -> a -> IO a
- aExecuteMonitors :: Verbosity -> UTCTime -> Int -> a -> IO (Maybe ByteString)
- aStdMonitorHeader :: a -> ByteString
- aCloseMonitors :: a -> IO a
- aSave :: AnalysisName -> a -> IO ()
Documentation
class Algorithm a where Source #
Class for algorithms used by MCMC samplers.
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.
:: 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.