I have a dataset of approximately monotonically increasing values (in a time-series). I am using keras
and LSTM
to train the model and perform the testing on the most recent values in the dataset. For example:
- Training set data from 2009 to 2018
- Test set data form 2018 to 2019 (will have higher values than train set by default )
It just so happens that - due to the increasing nature of the values - the LSTM has never been trained with these large values before. This is making the model perform poorly on new data.
However, when I shuffle the data beforehand i.e. the test set does contain values that the LSTM might have trained on before, the model generalizes better and performs better as well.
- Is this normal?
- Is there a way to combat this issue without shuffling?
- I am using stateless LSTM, so if I standardize the LSTM time windows independently could this be a good solution?
The below is a chart of the dataset: (Not the whole dataset but the large majority of it. Its a good indication of the trend)