# Question about using rolling windows for time series regression

I have say 10 time series which become the 10 features of my model and I train it on these using a rolling window of 6 to predict the following 1 timestep (so t-5 to t to predict t+1). Thus the input would be shape (6, 10) and output would be (1, 10). Let's say I train this model on a data set with 100,000 minute by minute time steps split into these rolling windows.

If I then have a test set of 1000 minute timesteps/rows , but I'm not interested in evaluation, my only goal is to get the prediction for the next minute at the end of this test set, in other words the 1001 row prediction, do I need to make the model predict on the full test set? Could I just get the last 6 rows of the test set and make the model predict just on those and take that output as the prediction for the time step at the end of the test set? Would both methods, predicting on the entire test set and taking the last row of the predicted output versus predicting on just the last 6 rows of the test set and taking that output, lead to the exact same predicted values?

As a side question, if you're using rolling windows with an LSTM model and your training data is huge, is it better to use large or small windows? In other words would using a window size of 6 to predict the next timestep be better than using a window of 1000 to predict the next 1 time step?

Thanks!

Would both methods, predicting on the entire test set and taking the last row of the predicted output versus predicting on just the last 6 rows of the test set and taking thay output, lead to the exact same predicted values?

Since the training has already finished, the two methods yield the same output.

As a side question, if you're using rolling windows with an LSTM model and your training data is huge, is it better to use large or small windows?

I think this one doesn't have a definite answer. Observe/plot your data (raw, ACF, PACF), and decide how many time-steps going back seems important information for the prediction. For example, if it has a clear seasonality having 30 mins, you shouldn't look back less than 30. This may even be one of your hyper-parameters to tune.

• If you're using an LSTM model though, wouldn't you want to also capture some of the trends or seasonality? Thanks! Jun 6 '20 at 21:57
• Yes, that is why you should observe your data. Jun 6 '20 at 21:59