2
$\begingroup$

I have a time series that I want to predict with an LSTM. I am able to get very good results using 50 datapoints predicting 51, but I struggle to get any accuracy using something like 200 datapoints to predict 220. After an epoch, my network outputs 0 for all inputs. Is there a technique for predicting multiple timesteps ahead of the final output with a neural network?

For example, would it make more sense to predict 1 timestep ahead 20 times in a row feeding the outputs back in to get to that 20th timestep? Training it on a sequence followed by the timestep 20 ahead does not seem to work so far.

$\endgroup$
  • 1
    $\begingroup$ You have asked about LSTM but for prediction maybe some other techniques like signal reconstruction or autoregressive prediction might be better? And iterative approach presents cummulative error - $i+2$ depends on how good $i+1$ was predicted, so treating data as solid ($200$ samples) and the rest as unreliable will give better results (still limited by the process). Also any additional knowledge about how underlying process would be helpful. $\endgroup$ – Evil Jun 29 '16 at 18:35
  • 1
    $\begingroup$ I haven't found many good resources on Autoregressive, and it seems like a net should be able to pick up with some accuracy in this sort of situation $\endgroup$ – Rob Jun 29 '16 at 18:47
  • 1
    $\begingroup$ Look at the answer, yes it will work to some extent, but still general case prediction (you have points without meaning) is the hardest case. For weather one of the best estimators is look at the mean through years if some range and yesterdays wheather with majority weight - the easiest and the best so far. But we know how weather behaves. So in your case any additional knowledge will help to get better prediction. $\endgroup$ – Evil Jun 29 '16 at 19:02
3
$\begingroup$

Yes, you could try applying the LSTM iteratively 20 times. In other words: use the first 200 datapoints to predict the 201th; then use datapoints 2..201 to predict the 202th; and so on, until you predict the 220th. You'll have to evaluate how well this works on a test set; it might work, or it might not.

This could still fail badly. It could even be that there is just no way to predict 20 timesteps out. For instance, it's possible that the short-term correlation is high but the long-term correlation is low. Think of the weather: it's possible to predict tomorrow's weather with relatively high accuracy, but seems to be extremely hard to predict the weather 3 weeks out. So there might just be fundamental barriers to making predictions that far into the future.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.