Setting a forecast horizon
A forecast horizon is the number of time steps into the future we want to forecast at any point in time. For instance, if we want to forecast the next 24 hours for the electricity consumption dataset that we have worked with, the forecast horizon becomes 48 (because the data is half-hourly). In Chapter 5, Time Series Forecasting as Regression, where we generated baselines, we just predicted the entire test data at once. In such cases, the forecast horizon becomes equal to the length of the test data.
We never had to worry about this until now because, in the classical statistical methods of forecasting, this decision is decoupled from modeling. If we train a model, we can use it to predict any future point without retraining. But with time series forecasting as regression, we have a constraint on the forecast horizon, and it has its roots in data leakage. This might be unclear to you now, so we’ll revisit this point after we have learned about...