One step ahead prediction using NARX networks
Afficher commentaires plus anciens
Thanks in advance for helping me. I am totally new to Matlab and to Neural Networks. I searched in google and in different forums but I still have doubts about a couple of things.
I am trying to program a NN that returns a prediction for prices of a commodity for the next day when introducing 7 different technical indicators and the closing price of the previous day. It is a project for university so it does not really matter much how accurate it predicts.
My doubts are the following ones:
1)I programmed and trained a NARX network:
if true
% code
end
%%TRAINS AND CREATES A ONE STEP AHEAD NEURAL NETWORK
%%Takes the data
X = tonndata(transpose(INPUT),true,false);
T = tonndata(transpose(OUTPUT3),true,false);
%%narxnet(inputDelays,feedbackDelays,hiddenSizes,trainFcn) takes these arguments
net = narxnet(1:1,1:1,8,'none','trainbr');
[Xs,Xi,Ai,Ts] = preparets(net,X,{},T);
net = train(net,Xs,Ts,Xi,Ai);
Y = net(Xs,Xi,Ai);
perf = perform(net,Ts,Y)
%%Creates the One-Step-Ahead network
netp = removedelay(net);
netp.name = [net.name ' - Predict One Step Ahead'];
[Xs,Xi,Ai,Ts] = preparets(netp,X,{},T);
Y = netp(Xs,Xi,Ai);
stepAheadPerformance = perform(netp,Ts,Y)
view(netp)
¿Should I train the removedelay network also? ¿Or with the first NARX training is enough?
2)If I need to predict one step ahead. ¿How can I call the NN without using any output data? Because I am not suppose to have them yet.
if true
% code
end
%%Takes the data
X = tonndata(transpose(INPUTtest),true,false);
T = tonndata(transpose(OUTPUTtest),true,false);
%%Returns the results
[Xs,Xi,Ai,Ts] = preparets(netp,X,{},T);
RESULTS = netp(Xs,Xi,Ai);
Thank you very much in advance. I know that they are probably basic questions, but I felt lost.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!