I have been reading several papers, articles and blog posts about RNNs (LSTM specifically) and how we can use them to do time series prediction. In almost all examples and codes I have found, the problem is defined as finding the next
x values of a time series based on previous data. What I am trying to solve is the following:
- Assuming We have
tvalues of a time series, what would be its value at time
So using different LSTM packages (deeplearning4j, keras, ...) that are out there, here is what I am doing right now:
Create a LSTM network and fit it to
tsamples. My network has one input and one output. So as for input I will have the following patterns and I call them train data:
The next step is to use for example
t_4as input and expect
t_5as output then use
t_5as input and expect
t_6as output and so on.
When done with prediction, I use
t_5,t_6to update my model.
My question: Is this the correct way of doing it? If yes, then I have no idea what does
batch_size mean and why it is useful.
Note: An alternative that comes to my mind is something similar to examples which generate a sequence of characters, one character at a time. In that case,
batch_size would be a series of numbers and I am expecting the next series with the same size and the one value that I'm looking for would be the last number in that series. I am not sure which of the above mentioned approaches are correct and would really appreciate any help in this regard.