MATLAB: After training the Neural Network, how to use it

Deep Learning Toolboxneural networktime series tool

Hello
I used the Time Series Tool to generate a Script. I've placed as the input a 365×24 matrix (energy demand each hour for each day) and as the Target the same matrix but one-day forward.
My intention is that once the program is finished, I would place a 1×24 vector of the hourly demand energy and the program would give me its prediction 24 hours ahead (this means a 1×24 vector solution).
However, I was not able to figure out how can I use the script once the network has been trained.
Any help would be highly appreciated

Best Answer

The first thing you need to do is determine the significant lags of the autocorrelation function obtained from the training fraction (default is 0.7) of the 1x8760 hourly data.
Since you only have one series, the appropriate timeseries function is narnet. Use datadivisionFcn 'divideblock' instead of the silly 'dividerand' default.
Next determine how many hours ahead you want to predict at once. You seem to be thinking of a 24-dimensional input predicting a 24 dimensional output with a one hour sliding window. However, there are other lower dimensional possibilities that will be indicated by the significant lags determined above.
Use the form
[ net tr Ys Es Xf Af]= train(net,Xs,Ts,Xi,Ai);
So that predictions beyond your current data can be initialized with Xf and Af and continued in the closeloop mode.
You can search for some of my examples in the NEWSGROUP and ANSWERS using the search words
greg narnet closeloop
Hope this helps.
Thank you for formally accepting my answer
Greg