NAR Neural network predict Y(t+1) value

Hi all, I am writing down a script matlab to try to use NAR neural network.
Let's suppose net is my network just created, also suppose that y is my array of values. NAR are used to predict y(t) starting from y(t-1), y(t-2), ... ,y(t -n) where n is the delay.
Let's suppose I have K values, If I run my net I will get K - n values (first n values are not computable, because of the delays ), ok? But If I want get the K +1 value (effective prediction), how can I do?
I have been thinking that to compute the K +1 value my net would use just the K, K-1, ...K-n values of my y, so I could set my y(k+1) in a random way.
Am I wrong?

 Accepted Answer

If you are limited to no more than n feedback delays, only use the 1 <= d <= n (not necessarily consecutive) delays that correspond to statistically significant correlations of the autocorrelation function of y. Examples can be found by searching NEWSGROUP and ANSWERS using
greg narnet nncorr
Then using
[ net tr Ys Es Xf Af ] = train( net, Xs, Ts, Xi, Ai);
yields the initial conditions Xf, Af for predicting beyond the original data.
However, you will probably have to close the feedback loop and continue training netc to reduce error propagation and extend the range of out-of-sample predictions.
For example, search NEWSGROUP and ANSWERS with
narnet closeloop
and
greg narnet closeloop
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (1)

Please, can anyone help me with the code that I can what is below? Thanks
For some applications it helps to get the prediction a timestep early. The original network returns predicted y(t+1) at the same time it is given y(t+1). For some applications such as decision making, it would help to have predicted y(t+1) once y(t) is available, but before the actual y(t+1) occurs. The network can be made to return its output a timestep early by removing one delay so that its minimal tap delay is now 0 instead of 1. The new network returns the same outputs as the original network, but outputs are shifted left one timestep.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 28 Jan 2014

Answered:

on 27 Oct 2022

Community Treasure Hunt

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

Start Hunting!