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

1 次查看(过去 30 天)
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?

回答(1 个)

Greg Heath
Greg Heath 2018-10-6
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

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by