Skip to content

Allow lags=0 in linear_model Class for Standard Regression Functionality #205

@jhug12

Description

@jhug12

Description:

I am proposing an enhancement for the Forecaster class in the functime library, specifically to support setting lags=0 in classes that inherit from Forecaster, such as linear_model. Currently, it is not possible to pass lags=0 as an argument to linear_model or probably other similar models that derive from the Forecaster class.

Issue:

The lack of support for lags=0 restricts users from implementing a standard multiple regression approach within the forecasting framework provided by functime. Here's an example of how one might attempt to set up a linear model forecaster without specifying lags, which implicitly requires non-zero lags:

from functime.forecasting import linear_model

forecaster_linear = linear_model(
    freq="1mo",
    lags=None
)

Desired Enhancement:

By allowing lags=0, users would be able to perform standard multiple regression analyses while benefiting from the features of functime, such as straightforward model changes and extensive cross-validation capabilities. This enhancement would make the library more versatile and applicable to a broader range of forecasting scenarios where traditional regression might be necessary.

Use Case:

This feature would be particularly useful in scenarios where the target is not known for the last n days. One Case would be the the target is the difference from current temperature to future temperature (the change) over n days. If I want to look at the future change over two days then I wouldn't have a value for the last day. Sometimes directly predicting a future value is not possible as the time series is not stationary and therefore differencing is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    forecastingForecasters and adaptershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions