1

I‘m new to tensorflow have a general question: I have a certain amount of training data and want to do a time series prediction. The intervals on my training data is one minute and I want to do a prediction for the following minutes based on the new input data which is provided via a REST API What I don‘t understand is this: Let‘s say I train the model with all the data till yesterday and this means I can predict the first values of today by a certain amount. But the new values of today have not been observed by the model that has been build yesterday. How would you solve this problem? Thanks

Poe Dator
  • 4,535
  • 2
  • 14
  • 35
Djboblo
  • 81
  • 1
  • 2

2 Answers2

0

Djboblo, I assume that you need to predict whole next day values on per minute basis. In that case your options are:

  1. recursive prediction, i.e. using predicted data as input for the next prediction
  2. structuring the model to provide you with prediction for the whole next day

If it is just a matter of predicting for a single minute forward and your model is trained on reasonably large amount of data - don't worry, just feed it with the values up to the prediction minute. Periodically you may re-train the model using new data.

Poe Dator
  • 4,535
  • 2
  • 14
  • 35
  • Thanks for your reply I've looked into RNN with a sliding window to it But say I want to predict the next 20min of data based on the size that I give to my window Wouldn't there be any overlapping issued? t-20_________t0__________t+20 At t0 I want to predict till t+20 and my model has finished training But at t1 I have to train it again with the data from t19 to t0 wich takes some time Or how would you solve this issue? – Djboblo Sep 21 '20 at 09:08
  • it is not necessary to re-train unless your data changed dramatically. just feed data from t-19 to t0 to your model for prediction. – Poe Dator Sep 21 '20 at 14:10
0

What I was looking for is this:

How to use a Keras RNN model to forecast for future dates or events?

to predict stateful events

and after a while use the .fit Method to update the network with new data

See: https://machinelearningmastery.com/update-lstm-networks-training-time-series-forecasting/

Djboblo
  • 81
  • 1
  • 2