NARX Neural network prediction?

2 visualizzazioni (ultimi 30 giorni)
Luis Cruz
Luis Cruz il 24 Giu 2015
Modificato: Greg Heath il 29 Giu 2015
Hi,
I am trying to solve a time series problem using the NARX Neural Network solution that Matlab provides. I am trying to understand how to predict actual values, but the results I get are almost perfect! The errors are so small that I am not sure if I am actually predicting. I just want to make sure I am doing everything right!
Basically I train the network with some samples using the GUI solution. Then I use the following script to test the neural network with new samples:
X = num2cell(open2(1:end))'; % input
T = num2cell(close2(1:end))'; % this is the output I should get
net = removedelay(net);
[Xs,Xi,Ai,Ts] = preparets(net,X,{},T);
Y = net(Xs,Xi,Ai);
plotresponse(Ts,Y)
view(net)
Y = cell2mat(Y);
T = cell2mat(T);
sizey = length(Y);
sizet = length(T);
T = T(1:sizey);
figure
plot(1:sizey,T,1:sizey,Y)
The graph I am getting is almost identical to the original target time series function. The errors are really small and the only difference is that the graph (Y) is shifted 2 samples to the left. But, am I really predicting?
Here's the graph:
Thanks in advance!

Risposta accettata

Greg Heath
Greg Heath il 29 Giu 2015
Modificato: Greg Heath il 29 Giu 2015
See my answer in the NEWSGOUP
Subject: Feedforward net lagged output
From: Greg Heath
Date: 28 Jun, 2015 15:17:03
Message: 2 of 2
Thank you for formally accepting my answer
Greg

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by