One-step forecasting using linear regression models with scikit-learn
In Chapter 10, Building Univariate Time Series Models Using Statistical Methods, you were introduced to statistical models such as autoregressive (AR) type models. These statistical models are considered linear models, where the independent variable(s) are lagged versions of the target (dependent) variable. In other words, the variable you want to predict is based on past values of itself at some lag.
In this recipe, you will move from statistical models into ML models. More specifically, you will be training different linear models, such as Linear Regression, Elastic Net Regression, Ridge Regression, Huber Regression, and Lasso Regression. These are considered linear regression models and assume a linear relationship between the variables.
In the previous recipe, you transformed a univariate time series into a multiple regression problem with five independent variables and one dependent variable (a total...