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

Allowing Application of Pipelines for Historical Forecasts and Backtests in Darts #1881

Closed
Nicholas-Amirsoleimani opened this issue Jul 5, 2023 · 1 comment
Labels
feature request Use this label to request a new feature

Comments

@Nicholas-Amirsoleimani
Copy link

Is your feature request related to a current problem? Please describe.
Yes, currently in Darts, the historical_forecasts and backtest methods do not provide an option to apply the inverse_transform method of a pipeline for each historical forecast. This is particularly problematic for transformers like darts.dataprocessing.transformers.Diff that rely on previous training values. Since for these transformers, we cannot simply apply inverse_transform to all historical forecasts at once. It requires the knowledge of the training data known at each time point rather than just the training data at the end of the original training set.

Describe proposed solution
A solution to this problem could be to allow an optional pipeline parameter in the historical_forecasts and backtest methods that, if provided, applies the inverse_transform method of the pipeline to each individual historical forecast. This would allow each forecast to be made with only the knowledge of the training data up to that point in time. The pipeline parameter could be optional, and if not provided, the methods would work as they currently do.

Describe potential alternatives
An alternative could be to create a new transformer that handles this specific situation, i.e., a transformer that, when provided with a pipeline, would automatically apply the inverse_transform method of the pipeline after each individual forecast. However, this might not be as flexible or as easily understandable as the proposed solution.

Additional context
This feature would be particularly beneficial for situations where the preprocessing step involves a transformation that relies on previous training values (like differencing). Currently, the inverse of this transformation cannot be correctly applied to the historical forecasts, which can lead to incorrect or misleading results. By allowing the inverse_transform method of a pipeline to be applied after each forecast, it would ensure more accurate results in these situations.

@Nicholas-Amirsoleimani Nicholas-Amirsoleimani added the triage Issue waiting for triaging label Jul 5, 2023
@madtoinou
Copy link
Collaborator

Hi @Nicholas-Amirsoleimani,

I think that this is a duplicate of #1540 (with a slightly different application/rational), feel free to reopen it if you feel like it's a different feature and should get a particular attention.

@madtoinou madtoinou added feature request Use this label to request a new feature and removed triage Issue waiting for triaging labels Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Use this label to request a new feature
Projects
None yet
Development

No branches or pull requests

2 participants