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

[Core] not balancing when doing aggregate() #244

Closed
iamyihwa opened this issue Oct 23, 2023 · 3 comments
Closed

[Core] not balancing when doing aggregate() #244

iamyihwa opened this issue Oct 23, 2023 · 3 comments
Labels

Comments

@iamyihwa
Copy link

What happened + What you expected to happen

In the previous version of the hierarchicalforecast, during the aggregate() , forecasting became balanced.

Used more recent version of the code, and noticed that aggregated dataframe was not balanced.
This can be seen by when grouping by unique_id, number of values are not same for all of them, and also lots of forecasted results are NaN finally, when doing aggregate, then forecast (using statsforecast).

image

Versions / Dependencies

0.4.0

Reproduction script

Y_df, S_df, tags = aggregate(pd_df, spec)

Issue Severity

None

@iamyihwa iamyihwa added the bug label Oct 23, 2023
@iamyihwa
Copy link
Author

iamyihwa commented Oct 23, 2023

When using previous version (0.3.0) , for the same dataframe, I get all time series balanced.
However taking much longer to perform aggregate() then the most recent version.

image

@jmoralez
Copy link
Member

Hey @iamyihwa, if your series have missing points I suggest you run the fill_gaps function first with start='global', end='global', fill the missing values with zero (which is what the previous version did) and then aggregate.

@iamyihwa
Copy link
Author

Yes ! @jmoralez ! It works fine with this method! Thanks for pointing me to it! It would perhaps be helpful to have this also in the documentation of the hierarchicalforecast and other libraries.

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

No branches or pull requests

2 participants