Hello everybody
I am new to statistics and ANN. I am using NARX (open-loop) to train a set of data (a time series as input X and a time series as target T, with more than 4000 data points). In the data, most of the time, X and T are constant, but sometimes X increases suddenly and after a short period of time T also increases, then X decreases to the constant value and T also decreases to its constant value. Please see the attached figure which shows a small part of the data.(in the figure, the green lines show the start of increase in X). After training the data I want to use the model to predict T at one-step ahead. But I have problem in training the data.
I use the following commands to create the net, train it, and then test it.
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);[inputs,inputStates,layerStates,targets] = ... preparets(net,inputSeries(train_period),{},targetSeries(train_period));[net,tr] = train(net,inputs,targets,inputStates,layerStates);outputs = net(inputs,inputStates,layerStates);
The output Y correlates to the target T, but, as can be seen in the figure, with a shift of about one step size!. In the lower plot, blue line is the target and red line shows the output. This is only a short part of the data, and this problem is seen in the whole data (even more serious when the bump in T is lower). My question is that why is there a shift of one step size between target T and output Y? How can I improve the model to have a good correlation between those two? I use 10 hidden layers, 3 input and feedback delays, and "divideint" for dividing the data. I also used other values for these parameters but no success.
I tried to use this trained model to predict one-step ahead of T, but as the output is shifted one step ahead in training, it also has a similar shift in the testing. Therefore, the result is not useful because when we are at time = n, the model gives the value of T at the same time as the output at time = n+1.
Any advice would be much appreciated. After solving this problem, I am going to use closed-loop to make multi-step ahead predictions.
Thank you!
Best Answer