MATLAB: NARX closed loop network & removedelay: What setting for inputDelays and feedbackDelays

Deep Learning Toolboxnarxneural networkremovedelay

I'm trying to use a NARX closed loop network to predict y five steps ahead based on x. I'm getting confused in setting inputDelays and feedbackDelays regarding the number of step ahead.
here is my current code
inputDelays = [6:15];
feedbackDelays = [1:10];
hiddenLayerSize = 15;
[net,tr] = train(net,inputs,targets,inputStates,layerStates);
netc = closeloop(net);
netd = removedelay(netc,5);
Question 1: Is this code predicting y(t+5)=f(x(t)) ?
Question 2: If so, what is the difference with using the setting inputDelays = [6:15] and feedbackDelays = [6:15] ?
Many thanks for helping!
Olivier

Best Answer

net = narxnet(ID,FD)
ID = [ id1, id2,... idmax ]: NONNEGATIVE increasing (not necessarily consecutive) integers
FD = [ fd1, fd2,... fdmax ]: POSITIVE increasing (not necessarily consecutive) integers
If n <= id1 and n < fd1
netrn = removedelay(net,n);
IDrn = [ id1-n, id2-n,... idmax-n ]: NONNEGATIVE increasing integers
FDrn: [ fd1-n, fd2-n,... fdmax-n ]: POSITIVE increasing integers
=======================================================================
ID = [ 6:15 ] , FD = [ 1:10 ]
y(t) = f( x(t-15):x(t-6), y(t-10): y(t-1) );
removedelay(net,n) subtracts n from each component of both ID and FD PROVIDED
n < min(FD) and n <= min(ID).
Obviously, n=5 should result in an error.
Hope this helps.
Thank you for formally accepting my answer
Greg