tsai
tsai copied to clipboard
bug in forecasting splits indices computation
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.
Edit: changed the zip file to a txt file
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