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: Thu May 21 14:35:11 2020.
Synopsis
- data Monitor a = Monitor {
- mStdOut :: MonitorStdOut a
- mFiles :: [MonitorFile a]
- mBatches :: [MonitorBatch a]
- type Period = Int
- simpleMonitor :: Period -> Monitor a
- data MonitorStdOut a
- monitorStdOut :: [MonitorParameter a] -> Period -> MonitorStdOut a
- msHeader :: MonitorStdOut a -> ByteString
- data MonitorFile a
- monitorFile :: String -> [MonitorParameter a] -> Period -> MonitorFile a
- type BatchSize = Int
- data MonitorBatch a
- monitorBatch :: String -> [MonitorParameterBatch a] -> BatchSize -> MonitorBatch a
- getMonitorBatchSize :: MonitorBatch a -> BatchSize
- mOpen :: String -> String -> ExecutionMode -> Monitor a -> IO (Monitor a)
- mExec :: Verbosity -> Int -> Int -> UTCTime -> Trace a -> Int -> Monitor a -> IO (Maybe ByteString)
- mClose :: Monitor a -> IO (Monitor a)
Create monitors
A Monitor
observing the chain.
A Monitor
describes which part of the Markov chain should be logged and
where. Further, they allow output of summary statistics per iteration in a
flexible way.
Monitor | |
|
simpleMonitor :: Period -> Monitor a Source #
Only monitor prior, likelihood and posterior functions with given period. Do not monitor parameters.
data MonitorStdOut a Source #
Monitor to standard output; construct with monitorStdOut
.
monitorStdOut :: [MonitorParameter a] -> Period -> MonitorStdOut a Source #
Monitor to standard output.
msHeader :: MonitorStdOut a -> ByteString Source #
Header of monitor to standard output.
data MonitorFile a Source #
Monitor to a file; constructed with monitorFile
.
:: String | Name; used as part of the file name. |
-> [MonitorParameter a] | |
-> Period | |
-> MonitorFile a |
Monitor parameters to a file.
data MonitorBatch a Source #
Batch monitor to a file.
Calculate summary statistics over the last given number of iterations (batch
size). Construct with monitorBatch
.
:: String | Name; used as part of the file name. |
-> [MonitorParameterBatch a] | |
-> BatchSize | |
-> MonitorBatch a |
Batch monitor parameters to a file, see MonitorBatch
.
getMonitorBatchSize :: MonitorBatch a -> BatchSize Source #
Batch monitor size.
Useful to determine the trace length.
Use monitors
mOpen :: String -> String -> ExecutionMode -> Monitor a -> IO (Monitor a) Source #
Open the files associated with the Monitor
.