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

Fixes bug when using historical forecast with discrete lags < -1 #2715

Merged
merged 17 commits into from
Mar 7, 2025

Conversation

authierj
Copy link
Contributor

@authierj authierj commented Mar 5, 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 #2697.

Summary

When regression models had discrete lags < -1, the end of the window of the target series for the historical forecasts was not corrected correctly. I fixed this.

Other Information

Nan

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.10%. Comparing base (f76aedf) to head (40ccf5d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2715      +/-   ##
==========================================
- Coverage   94.18%   94.10%   -0.08%     
==========================================
  Files         141      141              
  Lines       15596    15598       +2     
==========================================
- Hits        14689    14679      -10     
- Misses        907      919      +12     

☔ 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.

@authierj
Copy link
Contributor Author

authierj commented Mar 5, 2025

I don't really know how/where to test the overlap_end = True. A suggestion would be welcome!

Copy link
Collaborator

@madtoinou madtoinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR, a few adjustments to make and it should be ready.

I don't really know how/where to test the overlap_end = True. A suggestion would be welcome!

You can create a new test, just for the _get_historical_forecast_boundaries method or eventually in one of the test for regression model optimized historical forecasts for example.

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks a lot for the fix @authierj 🚀

@dennisbader dennisbader merged commit 19b17d2 into unit8co:master Mar 7, 2025
9 checks passed
@authierj authierj deleted the fix/fc_lag branch March 7, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants