Path: blob/master/Sequences, Time Series and Prediction/Week 1 - Sequences and Prediction/Week_1_Exercise_Question.ipynb
14462 views
Kernel: Python 3
In [ ]:
In [ ]:
In [ ]:
Now that we have the time series, let's split it so we can start forecasting
In [ ]:
Naive Forecast
In [ ]:
In [ ]:
Let's zoom in on the start of the validation period:
In [ ]:
Now let's compute the mean squared error and the mean absolute error between the forecasts and the predictions in the validation period:
In [ ]:
That's our baseline, now let's try a moving average:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
Great, the trend and seasonality seem to be gone, so now we can use the moving average:
In [ ]:
Now let's bring back the trend and seasonality by adding the past values from t – 365:
In [ ]:
In [ ]:
Better than naive forecast, good. However the forecasts look a bit too random, because we're just adding past values, which were noisy. Let's use a moving averaging on past values to remove some of the noise:
In [ ]:
In [ ]: