0

I have an LSTM model that was trained on the multi-feature daily dataset and predicts the target feature's value one day in the future.

How should I retrain the model each day as the new data becomes available? Should I rerun the model.fit with the full dataset (which gets updated each day) like in the example below?

model.fit(x_train, y_train, epochs=50, batch_size=20, 
          validation_data=(x_test, y_test), verbose=2, shuffle=False)

Or I can call model.fit only with the newly available data?

# run at the beggining once
model.fit(x_train, y_train, epochs=50, batch_size=20, 
          validation_data=(x_test, y_test), verbose=2, shuffle=False)
# run every day as the new data gets available.
model.fit(x_yesterday, x_yesterday)
Rokas.ma
  • 191
  • 1
  • 12

1 Answers1

0

Assuming you are using Keras, I would use train_on_batch See this previous question for the answer: What is the use of train_on_batch() in keras?

Corey Levinson
  • 1,553
  • 17
  • 25