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: Fri May 29 11:11:49 2020.
Batch mean monitors.
Synopsis
- data MonitorParameterBatch a = MonitorParameterBatch {}
- (@#) :: Lens' b a -> MonitorParameterBatch a -> MonitorParameterBatch b
- monitorBatchMean :: Real a => String -> MonitorParameterBatch a
- monitorBatchMeanF :: Real a => String -> MonitorParameterBatch a
- monitorBatchMeanE :: Real a => String -> MonitorParameterBatch a
- monitorBatchCustom :: String -> ([a] -> a) -> (a -> Builder) -> MonitorParameterBatch a
Batch parameter monitors
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.
(@#) :: Lens' b a -> MonitorParameterBatch a -> MonitorParameterBatch b Source #
Convert a batch parameter monitor from one data type to another using a lens.
For example, to batch monitor a real float value being the first entry of a tuple:
mon = _1 @# monitorBatchMeanRealFloat
:: Real a | |
=> String | Name. |
-> MonitorParameterBatch a |
Batch monitor. Print the mean with eight decimal places (half precision).
:: Real a | |
=> String | Name. |
-> MonitorParameterBatch a |
Batch monitor. Print the mean with full precision computing the shortest string of digits that correctly represent the number.
:: Real a | |
=> String | Name. |
-> MonitorParameterBatch a |
Batch monitor real float parameters such as Double
with scientific
notation and eight decimal places.
:: String | Name. |
-> ([a] -> a) | Function to calculate the batch mean. |
-> (a -> Builder) | Custom builder. |
-> MonitorParameterBatch a |
Batch monitor parameters with custom lens and builder.