I want to use a LSTM model to predict the future sales.
The data is like the table below.
date | store | family | sales |
---|---|---|---|
01/01/2013 | 1 | AUTOMOTIVE | 0 |
01/01/2013 | 1 | BABY CARE | 0 |
01/01/2013 | 1 | BEAUTY | 1 |
… | . | … | . |
01/01/2013 | 2 | AUTOMOTIVE | 0 |
01/01/2013 | 2 | BABY CARE | 0 |
… | . | … | . |
01/01/2013 | 50 | AUTOMOTIVE | 0 |
… | . | … | . |
01/02/2013 | 1 | AUTOMOTIVE | 0 |
01/02/2013 | 1 | BABY CARE | 50 |
… | . | … | . |
01/02/2013 | 2 | AUTOMOTIVE | 500 |
01/02/2013 | 2 | BABY CARE | 0 |
… | . | … | . |
01/02/2013 | 50 | AUTOMOTIVE | 0 |
… | . | … | . |
… | . | … | . |
12/31/2015 | 1 | AUTOMOTIVE | 0 |
12/31/2015 | 1 | BABY CARE | 50 |
… | . | … | . |
12/31/2015 | 2 | AUTOMOTIVE | 500 |
12/31/2015 | 2 | BABY CARE | 0 |
… | . | … | . |
12/31/2015 | 50 | AUTOMOTIVE | 0 |
… | . | … | . |
For each day, it has 50 stores.
For each store, it has different type of family (product). (They are all in perfect order, thank God).
Last, for each type of family, it has its sales.
Here is the problem.
The dimension of input of LSTM model is (Batch_Size, Sequence_Length, Input_Dimension). It is a 3D tensor.
However, in my case, my Input_Dimension is 2D, which is (rows x columns)
rows: number of rows in one day, which is 1782
columns: number of features, which is 2 (store and family)
Is there a good way to make my data into a shape that can be fed into a LSTM model?
Thanks a lot!