-
Notifications
You must be signed in to change notification settings - Fork 77
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
Broken aggregate function in main branch #211
Comments
Just to add some context: I have time series with the same ending date but different starting dates. I think it's ok for reconciliation to fill missing dates with zeros. However, for model training data I don't want to add leading zeros to my time series. |
Doesn't |
Yes I misspelled in the message above. The parameter is called is_balanced and the default value is False. I edited the message above. The issue is the same. |
I was looking into the source code for new version and old version here we are aggregating first and then getting column names as index for Y_bottom_df. but is old version (say snippet2 ) " Y_bottom_df.unique_id = Y_bottom_df.unique_id.astype('category') this small change has resolved this issue for me |
What happened + What you expected to happen
If I use hierarchicalforecast v0.3.0 there's a problem with "unbalanced" time series, see: #189
However, if you exclude this specific issue, it works fine.
If I use the latest version from the main branch (maybe after this commit? c107217) I have huge issues.
I have unbalanced time series.
If I set the new "is_balanced" parameter to False (the default behavior), the returned dataframe has many missing dates (ds). For some unique_ids I expect many years of data but I just get 2 rows.
If I set the new "is_balanced" parameter to True, I get a reshaping error.
The same code works with version 0.3.0. I had to revert to the released 0.3.0 version because the version in the main branch is not usable for me.
Versions / Dependencies
hierarchicalforecast main/master branch
Python 3.10
Linux
pandas 2.0.2
Reproduction script
Y_df, S_df, tags = aggregate(Y_df, spec)
Unfortunately, I can't share my data set.
Issue Severity
None
The text was updated successfully, but these errors were encountered: