Neural network time series prediction with ANN Toolbox
Show older comments
Hello all, I know this question has been asked several times but I would still want to know. I am a beginner in Matlab and I have been experimenting with ANN toolbox. I have managed to train a NARX neural network with a set of input and target values and now an advanced script is generated. My training input is a 200 day dataset of 5 days each that is it takes input of 5 days and predicts the 6th day.
My question is, how do I feed new inputs to this network to make predictions? That is, now, I wanna just take 5 previous including the current day and predict the value for tomorrow? How do I pass this 5 day input set and predict the target?
Thank you
Accepted Answer
More Answers (2)
Swathik Kurella Janardhan
on 16 Aug 2016
I am assuming you are referring to Neural Network Toolbox when you say "ANN Toolbox". My understanding of the issue is you have trained the NARX neural network successfully but you want to know how to test/use the trained network.
Refer to Neural Network Time Series Prediction and Modeling, this explains the steps to train and test the network. Step 6 in this link explains about the GUI interface to validate and test network.
You can also find the sample script in Step 17. The commands to train and test the network would be as below:
% Train the Network
[net,tr] = train(net,inputs,targets,inputStates,layerStates);
% Test the Network
outputs = net(inputs,inputStates,layerStates);
errors = gsubtract(targets,outputs);
performance = perform(net,targets,outputs)
4 Comments
Greg Heath
on 16 Aug 2016
If you design different types of NNs, it is less confusing if you do not use the function perform.
Instead, calculate the performance measure yourself.
FWIW
Greg
Shiladitya Chatterjee
on 16 Aug 2016
Shiladitya Chatterjee
on 23 Aug 2016
NM
on 5 Dec 2017
Hello Shiladtiya, I have the same question. Did you find out how to predict outputs on the trained network based on just inputs? I am using this command but it gives error. yPred= sim(net,X')';
Abolfazl Nejatian
on 23 Nov 2018
0 votes
here is my code,
this piece of code predicts time series data by use of deep learning and shallow learning algorithm.
best wishes
abolfazl nejatian
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!