Error while Reconciling Forecasts with TopDown Method in hierarchicalforecast #245
Unanswered
mjsandoval04
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
thank you so much for the lib, it is amazing!
I'm encountering an issue when attempting to reconcile forecasts using the TopDown method in the hierarchicalforecast library.
My intention for using the TopDown method is to leverage its capability, allowing me to override or input my own estimates for the top-level values, which would then be distributed down the hierarchy. This is crucial for the forecasting process where managerial or expert insights at the top level can be valuable and should be incorporated.
I have a hierarchical time series data with three levels: top_level, middle_level, and bottom_level. I've structured my aggregation matrix (S_df) accordingly (follow the tutorial in the website) and have forecasted values (Y_hat_df) for each series. However, when I attempt to reconcile the forecasts using the TopDown method with either forecast_proportions or average_proportions, I receive a KeyError.
KeyError: "None of [Index(['top_level1/middle_level2', 'top_level1/middle_level3', 'top_level1/middle_level4', 'top_level2/middle_level1', 'top_level3/middle_level2'], dtype='object')] are in the [columns]"
Attempted Solutions:
Checked the structure and alignment of the aggregation matrix and forecasted values.
Tried transposing the S_df matrix.
Consulted the library documentation to ensure that the inputs are being provided correctly.
Despite the above attempts, the issue persists.
I'd appreciate any insights or guidance on how to resolve this. Moreover, if anyone has a working example of the use of the TopDown method with either of the aforementioned reconciliation approaches, it would be immensely helpful.
Thank you for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions