pysad.statistics.RunningStatistic¶
- class pysad.statistics.RunningStatistic(statistic_cls, window_size, **kwargs)[source]¶
The running statistic that wraps any other statistics to track statistics with a fixed window size.
- Parameters:
statistic_cls (class) – The class to be instantiated and to be windowed.
window_size (int) – The window size.
**kwargs (Keyword arguments) – The keyword arguments that is input to the statistic_cls.
Methods
__init__
(statistic_cls, window_size, **kwargs)get
()Method to obtain the tracked statistic.
update
(num)Updates the statistic with the value for a timestep.