'How to split data and train an LSTM network on multiple time series
Use case: I have sales of 90 products during the first 180 days since the product launch. I want to train an LSTM network to predict sales 4 weeks ahead given the last 7 days of sales (and possibly also an autoregressive network that predicts 7 days ahead given all values registered so far of that product). The model should be able to predict sales on brand new products (not one of the 90).
What are the best way to split the data into training, validation, and test sets? Also, how should the LSTM model be trained - train on the entire datasets of the 80% oldest products, and backprop after each 4-week prediction? Any better way? I am using Python, Tensorflow.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|