neuralnet function not working with more than one input
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Lucas Ferreira-Correia
le 4 Juil 2019
Réponse apportée : Sahithi Kanumarlapudi
le 25 Juil 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 commentaires
Réponse acceptée
Sahithi Kanumarlapudi
le 25 Juil 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Modeling and Prediction with NARX and Time-Delay Networks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!