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

feat: allow stride=forecast_horizon for anomaly forecasting model #2709

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

madtoinou
Copy link
Collaborator

@madtoinou madtoinou commented Mar 3, 2025

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #2673.

Summary

  • Expose the stride argument in ForecastingAnomalyModel.predict_series, it must be equal to 1 or forecast horizon
  • Add the corresponding tests

Other Information

Using stride=forecast_horizon should speed up the forecasts at the cost of accuracy, not sure if we should also test this aspect?

@madtoinou madtoinou requested a review from dennisbader as a code owner March 3, 2025 14:08
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.12%. Comparing base (19b17d2) to head (395e077).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2709      +/-   ##
==========================================
- Coverage   94.18%   94.12%   -0.07%     
==========================================
  Files         141      141              
  Lines       15598    15605       +7     
==========================================
- Hits        14691    14688       -3     
- Misses        907      917      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dennisbader
Copy link
Collaborator

Thanks @madtoinou for this PR. However, I'm not sure that it fully solves the issue #2673. The issue was that it's not possible to fit() and score() with a ForecastingAnomalyModel with a stride != 1 (but == horizon).

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

Successfully merging this pull request may close these issues.

[QUESTION] Speed up scoring in ForecastAnomalyModel
2 participants