简体   繁体   English

来自输入数据的 Tensorflow 连续训练

[英]Tensorflow continous training from input data

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.我是 tensorflow 的新手,有一个普遍的问题:我有一定数量的训练数据,想要做一个时间序列预测。 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.我的训练数据的间隔是一分钟,我想根据通过 REST API 提供的新输入数据对接下来的几分钟进行预测我不明白的是:假设我用所有训练模型直到昨天的数据,这意味着我可以通过一定数量预测今天的第一个值。 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谢谢

Djboblo, I assume that you need to predict whole next day values on per minute basis. Djboblo,我假设您需要以每分钟为基础预测整个第二天的值。 In that case your options are:在这种情况下,您的选择是:

  1. recursive prediction, ie 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.您可以定期使用新数据重新训练模型。

What I was looking for is this:我要找的是这个:

How to use a Keras RNN model to forecast for future dates or events? 如何使用 Keras RNN 模型预测未来的日期或事件?

to predict stateful events预测有状态事件

and after a while use the .fit Method to update the network with new data一段时间后,使用 .fit 方法用新数据更新网络

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM