Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/Sequences, Time Series and Prediction/Week 1 - Sequences and Prediction/Week_1_Exercise_Question.ipynb
Views: 13373
Now that we have the time series, let's split it so we can start forecasting
Naive Forecast
Let's zoom in on the start of the validation period:
Now let's compute the mean squared error and the mean absolute error between the forecasts and the predictions in the validation period:
That's our baseline, now let's try a moving average:
Great, the trend and seasonality seem to be gone, so now we can use the moving average:
Now let's bring back the trend and seasonality by adding the past values from t – 365:
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: