Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[forecast] Allow specifying individual horizons #474

Open
christian-adam opened this issue Feb 3, 2025 · 0 comments
Open

[forecast] Allow specifying individual horizons #474

christian-adam opened this issue Feb 3, 2025 · 0 comments

Comments

@christian-adam
Copy link

Description

Currently, for a multi-step horizon, MLForecast allows the recursive and the direct strategy. As the models for the direct strategy are independent of each other, training a model for every step up to max_horizon can create a lot of overhead when only some of those models are actually required. Say I want to predict 7 and 14 days in advance - the direct strategy would train 14 models, but I would only be needing two of those.

I propose a horizons parameter to be added to MLForecast and LightGBMCV that allows specifying directly which steps to train on, like so:

fcst = MLForecast(
    models=lgb.LGBMRegressor(random_state=0, verbosity=-1),
    freq=1,
    num_threads=1,
    # max_horizon=14,
    horizons=[7,14]
)

Use case

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant