Keras Time Series Cross Validation

Viewed 397

I want to implement the cross-validation strategy below with time series data in a Keras LSTM.

enter image description here

Let's say I have n time series which I split each into m blocks. Since, I will be validating after every one of the nm input chunks, I am not sure how this will work with model.fit() in keras. How could I set up my training to loop, say 300 times, over all nm data chunks, validating after training each chunk?

As a bonus: Is there a way to use Keras' early stopping with this approach?

0 Answers
Related