Why shift 370 time steps and not let say 365 time steps?

Hello @Legends123

Welcome to our Community! Thanks for reaching out. We are here to help you.

The main idea of ​​using moving averaging on the past is to remove some noise when forecasting.
The first thing you must define is a time window; in this case, the time window was ten days, that is why they take a year ago (365 days) and add five days and then retake the 365 days, and now you subtract five days left to finish with a window of 10. (370 and 355).

If we do a test with a smaller time window of six days, we take the same principle, 365 +3 and 365 -3.

smooth_past_series = moving_average_forecast(SERIES[SPLIT_TIME - 368:-362], 6)

it will give you a mse: 9.98, mae: 2.09 for moving average plus smooth past forecast

A much more accurate precision because the window is much smaller

This specific time series has that moving average of 365 days due to seasonality, but when you face industry problems, you will find that much of this data seasonality can be monthly, weekly, fortnightly, daily, or even hourly; it is our role to find this seasonality and define a time window threshold to predict.

Hopefully, help :hugs:

1 Like