Need help NARX Neural Network forecasting methodology. 1,6,12 hours / step ahead ???

I read a lots of post in NARX topics/solutions, I'm very novice in this NN architecture/algorithm. I'm not sure what am I doing now is correct or not
This is what I'm going to do I want to use ANN with Back Propagation Multilayer perceptron model to predict rainfall rate. First I need to predict whether it is raining or not raining, then followed by the 1,6,12 hour look ahead prediction.
-Input data would be humidity, wind speed, pressure, temperature , dew point 
-target is the rainfall rate 
I have a data that in one hour interval for each input variable.
My questions are: 1- What is the input delay and feedback delay ( is it , if I want to forecast the next 6 hours , should I just set the input delay 1:6 ??? and 1:12 for the next 12 hours? 2- OR should I just create each dataset for each forecast time (t+n) ???
Here is my code
Input_Parameter = tonndata(ANN_num_TEST(:,[1:5]),false,false);
Target_Parameter = tonndata(ANN_num_TEST(:,6),false,false);
trainFcn = 'trainbr'; % Bayesian Regularization
% trainFcn = 'trainlm';
% trainFcn = 'trainrp';
% Create a Nonlinear Autoregressive Network with External Input
inputDelays = 1:1;
feedbackDelays = 1:1;
hiddenLayerSize = 10;
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize,'open',trainFcn);
% Prepare the Data for Training and Simulation
[Input_Net,Input_Net_initial,Layer_Delay_initial,Target_Net] = preparets(net,Input_Parameter,{},Target_Parameter);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 80/100;
net.divideParam.valRatio = 10/100;
net.divideParam.testRatio = 10/100;
% net.trainParam.max_fail = 50;
net.trainParam.min_grad=1e-10;
net.trainParam.show=10;
net.trainParam.lr=0.01;
net.trainParam.epochs=1000;
net.trainParam.goal=0.01;
% Train the Network
[net,tr] = train(net,Input_Net,Target_Net,Input_Net_initial,Layer_Delay_initial);
% Test the Network
% y = net(x,xi,ai);
Prediction_Result = net(Input_Net,Input_Net_initial,Layer_Delay_initial);
e = gsubtract(Target_Net,Prediction_Result);
performance = perform(net,Target_Net,Prediction_Result);
% View the Network
% view(net)
% variable for plot actual vs prediction
Prediction = (cell2mat(Prediction_Result))';
Cluster = (cell2mat(Target_Net))';
3- Is the forecast for t+1 ? Should I use multistep ahead NARX ???
Thank you
This is the result for 1 step ahead , why it is shifting?

댓글 수: 1

I have similar question asked above.
Does anyone have answer to this question?
Thank you in advance.

댓글을 달려면 로그인하십시오.

 채택된 답변

Greg Heath
Greg Heath 2016년 1월 24일
편집: Greg Heath 2016년 1월 24일
Choose the number of lags from the number of significant lags in the input/target crosscorrelation function and the target autocorrelation function.
I have zillions of examples in both the NEWSGROUP and ANSWERS just search on
greg nncorr
Hope this helps.
Thank you for formally accepting my answer
Greg

댓글 수: 1

Thank you Greg, I read your post in NEWSGROUP - now I'm working on Multistep via divideblock

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

질문:

2016년 1월 15일

댓글:

2021년 3월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by