Understanding Narx Neural Network code| Matlab
Вставка
- Опубліковано 19 вер 2024
- This video provides a deep knowledge of the code for the NARX Neural network in Matlab, as well as what each part of the code represents.
Previous videos:
1. Concept of Narx Neural Network
• Narx Neural Network | ...
2. How to develop a neural network model || FFNN|| Code
• How to develop a neura...
3. Artificial Neural Network
• What is an artificial ...
4. Types of Artificial Neural Networks
• What are the types of ...
5. How to calculate RMSE, R2 and NSC in Matlab
• How to calculate RMSE,...
6. Normalization of data | code| Matlab
• Normalization of data ... .
code for prediction of Narx Neural network
trainFcn = 'trainlm';
inputDelays = 1:2;
feedbackDelays = 1:2;
hiddenLayerSize = 12;
u=con2seq(train_in);
v=con2seq(train_tr);
w=con2seq(test_in);
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);
[Xs,Xi,Ai,Ts] = preparets(net,u,{},v);
net.trainParam.max_fail = 1000;
net.trainParam.min_grad=1e-7;
net.trainParam.epochs=1000;
net = train(net,Xs,Ts,Xi,Ai);
[Y,Xf,Af] = net(Xs,Xi,Ai);
perf = perform(net,Ts,Y)
y=cell2mat(Y);
Error1(train_tr(1,3:3305),y,'l')
[netc,Xic,Aic] = closeloop(net,Xf,Af);
Yc = netc(w,Xic,Aic);
yc=cell2mat(Yc);
Error1(test_tr,yc,'l')
I have a question: In a previous video you demonstrated ways of creating the input and target data in various lags in Excell. Here, in this code if we specify the input delay as 1:5, do we need to prepare the input in Excell with lag 1. lag 2..lag 5 arranged in adjacent columns or Matlab is clever enough to generate that on its one from a simple time series?
Please I want to send me the procedure of Matlab in pdf in order to usese in my work
Thank you very much for your effort. Actually i have a question if you don't minde.
When i export the narx code from nnstart its give me this function(X=tonndata(P) ,T=tonndata(T))
I don't know what is the point from this function?!
Also i want to predict with new values,can you please explain to us how to predict a multistep ahead .
Thanks again.
I am currently making a video with similar features of what you want. You can expect it in 3-4 days
@@myknowledgespace thank you very much
Great work, Could you also please share your code, How can I get in touch with you?
you can find the code in the description.