how to use NARX tool for a vectors of input to output?
    9 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
I have a input of matrix sample N =  100 with time span of 30 seconds with discretization with dt = 0.01. Input of  and for
 and for  and the corresponding output for
 and the corresponding output for  . How can I use the "NARX Neural Networks" for the above data. Please refer above DATA.mat file . How could the vector 100 samples are used for training and validate the trained model?
. How can I use the "NARX Neural Networks" for the above data. Please refer above DATA.mat file . How could the vector 100 samples are used for training and validate the trained model?
 and for
 and for  and the corresponding output for
 and the corresponding output for  . How can I use the "NARX Neural Networks" for the above data. Please refer above DATA.mat file . How could the vector 100 samples are used for training and validate the trained model?
. How can I use the "NARX Neural Networks" for the above data. Please refer above DATA.mat file . How could the vector 100 samples are used for training and validate the trained model?0 Commenti
Risposte (1)
  Vatsal
      
 il 4 Giu 2024
        Hi,
To use a NARX (Nonlinear Autoregressive with Exogenous Inputs) neural network in MATLAB for modeling a system where you have vector inputs and outputs, you can follow these steps:
% Load your data
% Transform input and output into cell arrays of cell arrays
input = arrayfun(@(idx) x{idx}, 1:size(x, 1), 'UniformOutput', false);
output = arrayfun(@(idx) y3{idx}, 1:size(y3, 1), 'UniformOutput', false);
% Create the NARX network
inputDelays = 1:2;
feedbackDelays = 1:2;
hiddenLayerSize = 10;
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);
% Prepare the data for training
[Xs,Xi,Ai,Ts] = preparets(net,input,{},output);
% Train the network
net = train(net,Xs,Ts,Xi,Ai);
% Test the network
outputs = net(Xs,Xi,Ai);
errors = gsubtract(outputs,Ts);
performance = perform(net,Ts,outputs);
view(net)
For more information on “NARX Neural Networks”, the following resources may be helpful:
https://www.mathworks.com/help/deeplearning/ug/design-time-series-narx-feedback-neural-networks.html 
I hope this helps!
0 Commenti
Vedere anche
Categorie
				Scopri di più su Deep Learning Toolbox in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

