What does the 'moving average' calculate?

Modified on Tue, 22 Apr at 12:15 PM

Within the Time Series Feature Extraction step, the 'moving average' option calculates the centred average value of the column selected. This enables to smoothen the curve and can be used when measurements are noisy, or to get rid of high frequency signals.


The time period T that is being averaged over is defined by entering a value in the 'window size' field (in number of timesteps). This moving average is 'centred' rather than 'trailing'. For each time step, the formula is looking to average T/2 before the current time step upto T/2 after the current time step. 


In the first and last rows in the series, the window is reduced the until is there isn't enough data before and after the current timestep to calculate the centred moving average. This ensures all datapoints in your original table as an associated 'moving average' value and the series isn't 'cropped'.


Here is an example with some comments:


  • The red curve is the raw signal with some noise.
  • For the blue curve, the moving average was applied with a window size of 0.1. You can see that there is still noise, which means that the window size might be too small.
  • For the blue curve, the moving average was applied with a window size of 0.5. The curve is much smoother and follows well the original signal.
  • For the purple curve, the moving average was applied with a window size of 2. The curve is really smooth, but it doesn't follow the original signal as well (see for example between 1 and 2 seconds), so the window size might be too large.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article