drytorch.utils.averages
Module containing classes and functions to average samples.
Functions
|
Return a moving average by specifying the decay. |
|
Return a trailing average by specifying window size. |
- get_moving_average(decay: float = 0.9, mass_coverage: float = 0.99) Callable[[Sequence[float]], float][source]
Return a moving average by specifying the decay.
- Parameters:
- Returns:
The moving average function.
- Raises:
ValueError – if the decay is not between 0 and 1.
ValueError – if the mass_coverage is not between 1 - decay and 1.
- Return type: