neuralnet function not working with more than one input
조회 수: 3 (최근 30일)
이전 댓글 표시
Lucas Ferreira-Correia
2019년 7월 4일
답변: Sahithi Kanumarlapudi
2019년 7월 25일
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!