libstatistics_collector
libstatistics_collector copied to clipboard
Enable setting window size for MovingAverageStatistics
Description
The MovingAverageStatistics should allow passing a window_size for the calculation of the moving average
I also think this feature is essential. In the first place, although it is called a moving average, it is actually calculating the overall average, which does not align with the class name. Just to confirm, the original intention of the implementation was to have MovingAverageStatistics calculate a moving average, correct?
Or was it simply intended to calculate an online average for the sequentially obtained data?
Looking at the implementation, it looks like it was definitely intended to cover all the data, even though it mentions "moving average."
However, changing it to be able to consider a real window (i.e., only the last X values) makes sense to me. PRs are welcome.