neuralnet function not working with more than one input
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Sahithi Kanumarlapudi
2019-7-25
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling and Prediction with NARX and Time-Delay Networks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!