How to run time series neural network on a rolling basis?

1 view (last 30 days)
I have 1000 data points. I want my neural network to train using the 1st 250 data points and forecast for 251st data point. I want to save this and compare with with the actual data. In the next iteration, I want to train for 1-251 data points and forecasr 252nd data point and store the predicted value. After this I want to train and validate the network using 1-252 data points and predict the 253rd data point. Like that I want to generate all the 750 predicted values (from 251 to 1000) and compare it with the actual values to backtest my model.
Can you please help me to solve this problem?

Answers (1)

Greg Heath
Greg Heath on 6 Oct 2018
What you want doesn't make much sense.
1. You are misusing the NN term validate. Typically, there are two steps
design + testing
However, typically design involves two substeps
design = training + validation
so that the complete process involves three substeps:
training + validation + testing
Details are in the MATLAB documentation.
I have posted zillions of examples in both the NEWSGROUP (comp.soft-sys.matlab) and ANSWERS.
Just search on
Greg narx
and
Greg narxnet
Hope this helps.
Thank you for formally accepting my answer
Greg

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Products


Release

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!