Moving-average smoothing
Why:
When they’re too many noises, sometimes moving-average
smoothing can help to identity trend.
—
Apply:
Choose a window size
Setup:
Default setting: rolling backward with window size k:
example : k = 3
when center = True, k is odd and k = 2q+1
when center = True, k is even, k = 2q
Choose window size :
- the window size of the filter should be chosen based on the application and the data being filtered. for example, weekly, monthly,quarterly
- It’s common to choose the seasonality period if exists
- The bigger the window, the smoother the trend