When we work with some real-world data, we might often find noise that is defined as pseudo random fluctuations in values that don't belong to the observation data. In order to avoid or reduce this noise, we can use different approaches, such as increasing the amount of data by the interpolation of new values, where the series is sparse; however, in many cases, this is not an option. Another approach is smoothing the series, typically using the averages
or exponential
method. The average
method helps us smooth the series by replacing each element in the series with either the simple, or the weighted average of the data around it. We will define the Smoothing Window to the interval of possible values, which controls the smoothness of the result. The main disadvantage of using the moving averages approach is that if we have outliers or abrupt jumps in the original time series, the result might be inaccurate and can produce jagged curves.
In this chapter, we will implement...