Time series forecast with recurrent Elman network in neurolab

送分小仙女□ 提交于 2020-01-04 06:12:41

问题


I use the Elman recurrent network from neurolab to predict a time series of continuous values. The network is trained from a sequence such that the input is the value at index i and the target is the value at index i+1.

To make predictions beyond the immediate next time step, the output of the net is feed back as input. If, for example, I intend to predict the value at i+5, I proceed as follows.

  1. Input the value from i
  2. Take the output and feed it to the net the as next input value (e.g. i+1)
  3. Repeat 1. to 3. four more times
  4. The output is a prediction of the value ati+5

So for predictions beyond the immediate next time step, recurrent networks must be activated with the output from a previous activation.

In most examples, however, the network is fed with an already complete sequence. See, for example, the functions train and sim in the example behind the link above. The first function trains the network with an already complete list of examples and the second function activates the network with a complete list of input values.

After some digging in neurolab, I found the function step to return a single output for a single input. Results from using step suggest, however, that the function does not retain the activation of the recurrent layer, which is crucial to recurrent networks.

How can I activate a recurrent Elman network in neurolab with a single input such that it maintains its internal state for the next single input activation?


回答1:


It turns out it is quite normal for output which is generated from previous output sooner or later to converge towards a constant value. In effect, the output of a network cannot depend only on its previous output.




回答2:


I obtain the same result - constant . However I noticed something:

-> if you use 0 and 1 data, results improve. 0 - decrease 1 - increase. Result is no longer a constant.

-> try to use another variable to explain the targeted one as one of our colleagues already mentioned.



来源:https://stackoverflow.com/questions/37971667/time-series-forecast-with-recurrent-elman-network-in-neurolab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!