Time Series Tutorial
Selected Reading
- Time Series - Discussion
- Time Series - Useful Resources
- Time Series - Quick Guide
- Time Series - Further Scope
- Time Series - Applications
- Time Series - Error Metrics
- Time Series - LSTM Model
- Time Series - Prophet Model
- Time Series - Walk Forward Validation
- Time Series - Exponential Smoothing
- Time Series - Variations of ARIMA
- Time Series - ARIMA
- Time Series - Moving Average
- Time Series - Auto Regression
- Time Series - Naive Methods
- Time Series - Parameter Calibration
- Time Series - Modeling
- Data Processing & Visualization
- Time Series - Python Libraries
- Time Series - Programming Languages
- Time Series - Introduction
- Time Series - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Time Series - Walk Forward Validation
Time Series - Walk Forward Vapdation
In time series modelpng, the predictions over time become less and less accurate and hence it is a more reapstic approach to re-train the model with actual data as it gets available for further predictions. Since training of statistical models are not time consuming, walk-forward vapdation is the most preferred solution to get most accurate results.
Let us apply one step walk forward vapdation on our data and compare it with the results we got earper.
In [333]:
prediction = [] data = train.values for t In test.values: model = (ExponentialSmoothing(data).fit()) y = model.predict() prediction.append(y[0]) data = numpy.append(data, t)
In [335]:
test_ = pandas.DataFrame(test) test_[ predictionswf ] = prediction
In [341]:
plt.plot(test_[ T ]) plt.plot(test_.predictionswf, -- ) plt.show()
In [340]:
error = sqrt(metrics.mean_squared_error(test.values,prediction)) print ( Test RMSE for Triple Exponential Smoothing with Walk-Forward Vapdation: , error) Test RMSE for Triple Exponential Smoothing with Walk-Forward Vapdation: 11.787532205759442
We can see that our model performs significantly better now. In fact, the trend is followed so closely that on the plot predictions are overlapping with the actual values. You can try applying walk-forward vapdation on ARIMA models too.
Advertisements