below is the code for training using narx netowrk ( i have a non linear dataset) , can someone help me write the code for predicting for new data set using the trained nework net and final layer states? i have given many trials, but was unsuccesfull.
XTrain = tonndata(Predictors_train,false,false); % input for training
TTrain = tonndata(Responsers_train,false,false); % output for training
XPredict = tonndata(Predictors_test, false, false); % input for prediction ( new dataset for testing trainied network)
TTarget =tonndata(Responsers_test,false,false); % corresponding output -new dataset - (in reality it will be unkown)
net = narxnet(1:2,1:2,10);
% view(net);
[Xs,Xi,Ai,Ts] = preparets(net,XTrain,{},TTrain);
net = train(net,Xs,Ts,Xi,Ai);
[Y,Xf,Af] = net(Xs,Xi,Ai);
perf = perform(net,Ts,Y);
Y_mat = (cell2mat(Y))';
Ts_mat = (cell2mat(Ts))';
figure;
plot(Y_mat,'r', 'linewidth',1.2);
hold on;
plot(Ts_mat,'b','linewidth',1.2);
%% Prediction on new data set using the trained network