Copyright | (c) Dominik Schrempf 2020 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
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]
- data MonitorStdOut a
- monitorStdOut :: [MonitorParameter a] -> Int -> MonitorStdOut a
- data MonitorFile a
- monitorFile :: String -> [MonitorParameter a] -> Int -> MonitorFile a
- data MonitorBatch a
- monitorBatch :: String -> [MonitorParameterBatch a] -> Int -> MonitorBatch a
- mOpen :: String -> Monitor a -> IO (Monitor a)
- mAppend :: String -> Monitor a -> IO (Monitor a)
- mHeader :: Monitor a -> IO ()
- mExec :: Int -> (Int, UTCTime) -> Trace a -> Int -> Monitor a -> IO ()
- mClose :: Monitor a -> IO (Monitor a)
Create monitors
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 | |
|
data MonitorStdOut a Source #
Monitor to standard output.
:: [MonitorParameter a] | Instructions about which parameters to log. |
-> Int | Logging period. |
-> MonitorStdOut a |
Monitor to standard output.
data MonitorFile a Source #
Monitor to a file.
:: String | Name; used as part of the file name. |
-> [MonitorParameter a] | Instructions about which parameters to log. |
-> Int | Logging period. |
-> MonitorFile a |
Monitor parameters to a file.
data MonitorBatch a Source #
Monitor to a file, but calculate batch means for the given batch size.
XXX: Batch monitors are slow at the moment because the monitored parameter has to be extracted from the state for each iteration.
:: String | Name; used as part of the file name. |
-> [MonitorParameterBatch a] | Instructions about which parameters to log and how to calculate the batch means. |
-> Int | Batch size. |
-> MonitorBatch a |
Monitor parameters to a file, see MonitorBatch
.
Use monitor
mAppend :: String -> Monitor a -> IO (Monitor a) Source #
Open the files associated with the Monitor
in append mode.