Error using preparets (line 110) Targets and inputs have different numbers of timesteps.
1 次查看(过去 30 天)
显示 更早的评论
I am using NARXNET to forecast wind speed using 25 different metrological data. Getting error as "Error using preparets (line 110) Targets and inputs have different numbers of timesteps."
my data N1 is 186 X 26 matrix with 26th column as target. [N1,header]=xlsread('DATA_ADL.xlsx',6); N1=N1'; %% in=N1(1:186,1:25); out=N1(1:186,26:26); % inputSeries= con2seq(in); targetSeries= con2seq(out); % trainFcn = 'trainlm'; % Levenberg-Marquardt backpropagation.
inputDelays = 1:10; feedbackDelays = 1:8; hiddenLayerSize = [5 12];
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize,'open',trainFcn);
net.layers{1}.transferFcn = 'radbasn'; net.layers{2}.transferFcn = 'tansig'; net.layers{3}.transferFcn = 'tansig';
net.inputs{1}.processFcns = {'mapminmax','mapstd'}; net.inputs{2}.processFcns = {'mapminmax','mapstd'};
[inputs,inputStates,layerStates,targets] = preparets(net,inputSeries,targetSeries);
Can anyone help? what i am doing wrong on this?
1 个评论
ZaidiN
2018-7-14
Have you checked size of inputSeries and targetSeries
they must be [1 26] and [1 1] respectively.
回答(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!