Search code examples
matlabmachine-learningneural-networktime-seriesforecasting

Delay issue in time series prediction


I am having an issue using neural networks to predict time series. Some predicted data fits with the expected data, as bellow: (In black the real time series and in blue the output of my neural network)

Australia energy demand Time serie: Australia energy demand.

But with the same code, with other time series, the predicted data does not fits with the expected data, and has a delay of one unit, as bellow:

enter image description here Time serie: Walmart Stock price. enter image description here Time serie: Dollar libra exchange.

I found some articles about some variations of neural networks and at the results section shows the plot with the delay like my results, as bellow:

enter image description here Time serie: Dollar libra exchange. (Article link: http://www.sciencedirect.com/science/article/pii/S1877050915015793)

Anyone knows if this is a common behavior or can be something wrong with my code ? I am having this issue about three months ago, and since there I am trying to figure out some bug in my code but is all right.

Thanks and I appreciate any tip.


Solution

  • I recently had a problem like this. The answer was simply that the model was not good enough. Qualitatively, the model is predicting that your next output will be very similar to the previous one, so the output appears to be delayed by one. Improve your model (different type of net, number of hidden layers, feedback, etc), and the predictions will improve, and the appearance of off-by-one will disappear.