Multi-step forecasting using linear regression models with scikit-learn
In the One-step forecasting using linear regression models with scikit-learn recipe, you implemented a one-step forecast; you provide a sequence of values for the past 10 periods () and the linear model will forecast the next period (), which is referred to as. This is called one-step forecasting.
For example, in the case of energy consumption, to get a forecast for December 2021 you need to provide data for the past 10 months (February to November). This can be reasonable for monthly data, or quarterly data, but what about daily or hourly? In the daily temperature data, the current setup means you need to provide temperature values for the past 10 days to obtain a one-day forecast (just one day ahead). This may not be an efficient approach since you have to wait until the next day to observe a new value to feed to the model to get another one-day forecast.
What if you want to predict more than one future...