MATLAB: How can find the optimal delays and number of hidden nodes in narnet for forecasting task

neural networksprediction

I have tried with these code but I haven't found solutions:
1/ Optimal timelags?
N = length(Target)
zy = zscore(Target,1);
autocorry = ifft( abs(fft(zy)).^2 )/N
%AUTOCORRELATION
ZT=zscore(Target,1);
autocorrT = nncorr(ZT,ZT,N-1,'biased')
figure(3)
plot(autocorrT)
%title('ACF')
2/Optimal hidden nodes???
%To find H
[I ,N]=size(Input);
[O ,N]=size(Target);
Neq=N*O;
Hub=floor((N-1)*O/(I+O+1)) %max H for Neq>=Nw
Thank you in advance.

Best Answer

I have many posts regarding this.
Search both the NEWSGROUP and ANSWERS using subsets of the following search words
greg narnet nncorr siglag95 Hub Ntrials tutorial
Hope this helps.
Greg