neuralnet function not working with more than one input
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Lucas Ferreira-Correia
il 4 Lug 2019
Risposto: Sahithi Kanumarlapudi
il 25 Lug 2019
Hi
I've been trying to obtain a NARX model via neuralnet. The model has three inputs and one output.
z = iddata(T, [X1 X2 X3], 0.1);
ff_net = feedforwardnet(5);
ff_net.numInputs = 3;
ff_net.inputs{1}.name = 'Current';
ff_net.inputs{2}.name = 'Temperature';
ff_net.inputs{3}.name = 'SOC';
ff_net.inputConnect = [1 1 1; 0 0 0];
ff_net.divideFcn = 'divideblock';
ff_net.divideParam.trainRatio = 0.4;
ff_net.divideParam.valRatio = 0.3;
ff_net.divideParam.testRatio = 0.3;
nonlinearity = neuralnet(ff_net);
Every time I try to run the script it gives me the error:
Error using neuralnet/set.Network (line 122)
The value of the "numInputs" property of the NETWORK object must be equal to 1.
Error in neuralnet (line 99)
this.Network = net;
leading me to assume it won't work with multiple inputs but how else can I do what I want?
Hope you understand me, I myself am very new to this area.
Cheers,
Lucas
edit: Perhaps it has something to do with the fact that Matlab doesn't know that eg. Current is X1. Is there a way to make the connection?
0 Commenti
Risposta accettata
Sahithi Kanumarlapudi
il 25 Lug 2019
neuralnet cannot be used to obtain NARX model in your case as you have multiple number of inputs.
narxnet can be used to obtain a NARX model.
Here is how you could obtain a NARX model
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Modeling and Prediction with NARX and Time-Delay Networks 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!