After training my Neural Network, how do I use it?
1 次查看(过去 30 天)
显示 更早的评论
Hello
I used the Time Series Tool to generate a Script. I've placed as the input a 365x24 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 1x24 vector of the hourly demand energy and the program would give me its prediction 24 hours ahead (this means a 1x24 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
0 个评论
采纳的回答
Greg Heath
2014-8-28
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
2 个评论
Greg Heath
2014-8-30
Single inputs (24x1) and outputs (24x1) are column vectors, not row vectors.
Do not use the dividerand default that destroys correlations.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!