MATLAB: NARX Multi step ahead predictions

narx multiple step ahead prediction

I am relatively new to neural network and I have a few, perhaps very basic questions that I need some help to better understand it.
1) I am trying to use NARX to predict multi-step ahead time series. I have 4 inputs (say 500 rows by 4 column) and 1 target (say 500 rows by 1 column) output historical data and I would like to predict say 10 days ahead. I am using Narx because I think it suit me the best. However, I could hardly get my head around with the multiple step ahead prediction because (please correct me if I am wrong), from what I understand I will need inputs for the future 10 days in advance to be fed into the network in which I do not have. So how can I get around with this? I don't think NAR will suit in this case because I need these inputs and these are the key characteristics of the time series. Or should I use multiple model? something is missing…
2) after the training using open loop, I switched to close loop however I get very bad performance (mse open loop of ~0.3 and close loop ~250) checked both error correlations, looks ok within 95% confident limit, any hints on what have gone wrong would be very much appreciated.
3) I generated the simple code for the network, may I know how should I use it to forecasting time series? I don't think I will need to keep on running the training data set and test data set every 10 days (in this example of 10 days ahead predictions) or that is how it works?
I have been searching the forum quite thoroughly for these answers but I couldn't find the answer I am looking for… any help would be greatly appreciated.

Best Answer

1. Traditionally, with
[ I N ] = size(input) % [ 4 500 ]
[ O N ] = size(target) % [ 1 500 ]
you would use a subset of the statistically significant delays from the
a. target/input crosscorrelation functions.
b. target autocorrelation function
I have posted many relevant examples in both the NEWSGROUP and ANSWERS. Try the search words
nncorr significant greg
2. However, before doing 1, you might just cross your fingers and try ("o" and OL will indicate an open-loop net)
ID = 0:10; FD = 1:10;
neto = narxnet(ID, FD, H);
neto.divideFcn = 'divideblock';
and vary the number of hidden nodes, H; If needed, the default 0.7/0.15/0.15 trn/val/tst ratios could be modified to increase the size of the training set.
3. Yes, you need inputs for post target NARX prediction. If you have none, try to estimate them using the original input and target data.
NOTE: THIS IS NOT MENTIONED IN MATLAB DOCUMENTATION !
4. I have found that just closing the loop on an OL net only works if the OL error is very small. I try to obtain at least
MSEtrno <= 0.001*mean(var(target',1)) % i.e., Rsqtrno >= 99.9%
However, the reliability of this assumption remains to be investigated.
5. The fastest way to obtain help from this forum is to use the MATLAB example data obtained from
help nndatasets
doc nndatasets.
Hope this helps.
Thank you for formally accepting my answer
Greg