statsforecast icon indicating copy to clipboard operation
statsforecast copied to clipboard

[Models] General support for exogenous regressors

Open AzulGarza opened this issue 2 years ago • 0 comments

Description

Only AutoARIMA and MSTL-AutoARIMA currently support exogenous regressors. A practical and effective approach is to first fit a model using the target variable and the exogenous regressors, and subsequently fit a statistical model on the residuals. This can be accomplished with a class named ExogenousRegressor, which accepts a model (potentially a sklearn model) to regress y using X and a StatsForecast model to fit the residuals. This could look something like:

model = ExogenousRegressor(LinearRegression(), AutoARIMA())

In this configuration, Linear Regression will be utilized to regress y using X, followed by ARIMA to model the residuals. This class should be included in statsforecast/models.py and should include methods that are available in other StatsForecast models.

Use case

No response

AzulGarza avatar Jun 09 '23 00:06 AzulGarza