MATLAB: NARX time delay estimation

correlationDeep Learning Toolboxnarxneural networktime delaytutorial

Hello, I’m trying to determine the feedback and input delays for a 3-input 1-output NARX network using target-target auto-correlation and input/target cross-correlation, respectively. For each input/target pair, the max. cross-correlation (peak) value occurs at a different lag. Given that all input delays must be the same for a NARX network, which value out of the 3 different lags should I select? The smallest one?
For the target-target auto-correlation, the max. lag is at 0, and the value of the auto-correlation coefficients decreases as the number of lags increase. How is the proper feedback delay selected in this case?
Sorry if these questions seem trivial; any help would greatly be appreciated. Thank you!

Best Answer

Consider all lags that are significant.
If your cross-correlation function does not output significance levels, consider my approach for the 95% confidence level:
1. Order the absolute values of the cross-correlation between zscore(t,1) and zscore(randn(1,N),1).
2. Choose the value at floor(0.95*(2*N-1)).
3. Repeat 100 or more times and average the result.
4. Design a timedelaynet and only keep as many significant input delays as you need.
5. Design a narnet and only keep as many significant feedback delays as you need.
6. Design a narxnet using the delays obtained in 4 and 5.
If you search using the word NNCORR you will find many of my examples
Thank you for formally accepting my answer
Greg