Filter löschen
Filter löschen

To check the working of NARX neural network for time series prediction

2 Ansichten (letzte 30 Tage)
Hi all, i am using NARX neural network to train my model. for the training of neural network, my data train is 31*468 double , data test is 31*168 and target train is 1*468 whereas target test is 1*168 But i am encountering the error as "
>> [inputStates,Xi,Ai,targetStates] = preparets(net,data_train,{},target_train)
Index in position 2 exceeds array bounds (must not exceed 1).
Error in preparets (line 293)
xi = xx(:,FBS+((1-net.numInputDelays):0));
My NARX net configuration is :
trainFcn = 'trainlm';
inputDelays = 1:2;
feedbackDelays = 1:2;
hiddenLayerSize = 10;
net.performFcn = 'mse';
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize,'open',trainFcn);
[inputStates,Xi,Ai,targetStates] = preparets(net,data_train,{},target_train)
net = train(net,Xs,Ts,Xi,Ai);
view(net)
net.divideFcn = 'divideblock'; % Divide data in blocks
net.divideMode = 'time'; % Divide up every value
net.trainFcn = 'trainlm'; % Levenberg-Marquardt
[net,tr] = train(net,data_train,target_train,inputStates,layerStates)

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by