utils.tracker.sliding_window#
Classes
A sliding window tracker that stores the k last elements of the stream allowing for computation of the mean and variance of the last k values. |
- class utils.tracker.sliding_window.SlidingWindowTracker(k)[source]#
Bases:
TrackerA sliding window tracker that stores the k last elements of the stream allowing for computation of the mean and variance of the last k values.
- property mean#
Returns the current mean of the sliding window.
- property std#
Returns the standard deviation of the sliding window.
- property var#
Returns the variance of the sliding window.