Error using preparets (line 110) Targets and inputs have different numbers of timesteps.

2 vues (au cours des 30 derniers jours)
sujan ghimire
sujan ghimire le 5 Nov 2017
Commenté : ZaidiN le 14 Juil 2018
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 commentaire
ZaidiN
ZaidiN le 14 Juil 2018
Have you checked size of inputSeries and targetSeries
they must be [1 26] and [1 1] respectively.

Connectez-vous pour commenter.

Réponses (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by