MATLAB: How to predict next value using time series

Deep Learning Toolboxneural network toolboxprediction

Hi, is there a way to use neural network toolbox to predict the next value in a time series?

Best Answer

1. Override 'dividerand' to obtain constant intervals between points. For example
net.divideFcn = 'divideblock'
2. Obtain the final states Xf,Af from training
[ net tr Ys Es Xf Af] = train(net,Xs,Ts,Xi,Ai);
%Ys = net(Xs,Xi,Ai);
%Es = gsubtract(Ts,Ys);
3. You have to know the new initial state conditions Xinew, Ainew to predict points after the original data; Then
Ynew = net(NaN(n),Xinew,Yinew))
will yield n predictions. If Xinew,Ainew = Xf,Af, then Ynew is a gapless contnuation of Ys.
Hope this helps.
Thank you for formally accepting my answer
Greg