MATLAB: NARX multi step predictions for external test data by using training data

external datasetmultistep predictionsnarxtest datatrain data

I am trying to build a network to do some long term predictions. I've uploaded the data and the network architecture. My data is comprised of two datasets (training and test subsets as attached). NARX neural network is used for training Input_Data and Output_Data. Then I tried to make multiple step predictions for test set (Input_Data1 and Output_Data1) by using trained net function but I cannot do predictions longer than length of test day and the predictions are very poor. When I replace the test input data with train data to predict output time steps as {x2 = X(1,predictOutputTimesteps); >> x2 = X2(1,predictOutputTimesteps);} and {LI=length(Input_Data1); >> LI=length(Input_Data);}, the result follows same pattern with train data.
How can I correctly form multi step predictions for test data by using net functions of training data?
I hope I was clear in my query.

Best Answer

I have found several problems with your exercise.
You will see the major problem if you just plot your data.
You should also see that your choice of lags and number of hidden nodes may be inadequate.
Look at the correlation and crosscorrelation functions to determine an effective subset of lags.
Thank you for formally accepting my answer
Greg