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

bug in forecasting splits indices computation #776

Open
lo-zed opened this issue May 30, 2023 · 1 comment
Open

bug in forecasting splits indices computation #776

lo-zed opened this issue May 30, 2023 · 1 comment
Labels
under review Waiting for clarification, confirmation, etc

Comments

@lo-zed
Copy link

lo-zed commented May 30, 2023

When function get_forecasting_splits is used with the argument unique_id_cols, the computation for the split indices is wrong. The function only substracts fcst_history - 1 from the data frame indices, which is incorrect since this can accumulate when several ids are present.

See the attached code for a minimal example and a proposition on how to solve it.

bug_report_indices.txt

Edit: changed the zip file to a txt file

@oguiza oguiza added the under review Waiting for clarification, confirmation, etc label May 30, 2023
@lo-zed
Copy link
Author

lo-zed commented May 31, 2023

line 87 of my file 'bug_report_indices.txt' I forgot to add [0] at the end. The line should read

            valid_idxs = np.where((usable_step_codes >= valid_start))[0]  # CORRECTED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under review Waiting for clarification, confirmation, etc
Projects
None yet
Development

No branches or pull requests

2 participants