Time series prediction using multiple series

30 views (last 30 days)
NAR seems to be the tool of choice for predicting future values of a single time series y, using only its past as input.
NARX is the tool when there is a second series x thought to be predictive of the first, along with that series.
What are the best approaches when there are multiple "second series" to be used, eg x1, x2,... XN ?

Accepted Answer

Greg Heath
Greg Heath on 17 Jan 2013
Edited: Greg Heath on 17 Jan 2013
Before blindly using ANY time series function, determine which delays are significant.
[ O N ] = size(t); O = 1
[I N ] = size(x); I >=1
zsct1 = zscore(t,1);
zscx1 = zscore(x',1)';
Now use xcorr, crosscorr (which I do not have) or nncorr to calculate and plot, correlation functions to help determine the significant positive delays of
1. The output autocorrelation function (correlation of current output with past outputs)
autocorrt = nncorr(zsct1,zsct1,N-1,'biased');
autocorrt(positive delays) = autocorrt(N+1:2*N-1);
2. Positive delays of the input/output crosscorrelation functions (correlation of current input with past outputs)
crosscorrtx1 = nncorr(zsct1,zscx1(1,:),N-1,'biased');
crosscorrtx2 = nncorr(zsct1,zscx1(2,:),N-1,'biased');
crosscorrxtI = nncorr(zsct1,zscx1(I,:),N-1,'biased');
However, the time series neural nets do not allow different delays for
different components of the input.
Hope this helps.
Thank you for formally accepting my answer.

More Answers (2)

Abolfazl Nejatian
Abolfazl Nejatian on 23 Nov 2018
here is my code,
this piece of code predicts time series data by use of deep learning and shallow learning algorithm.
best wish
abolfazl nejatian

Shashank Prasanna
Shashank Prasanna on 17 Jan 2013
You can provide any number of exogenous inputs to your NARX network. If you are using the neural network toolbox, then just stack them all up in a cell and feed it to the network.
Run "NTSTOOL" and click 'load example data set', has some examples where they provide more than 1 X


Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!