hierarchicalforecast
hierarchicalforecast copied to clipboard
Example not working
Trying to implement on forecasts that i already have (both aggregations and low level)
I made my own summing matrix but when running the tutorial to see what the y_hat_df was formatted like, ran into this error:
"""
TypeError Traceback (most recent call last)
3 frames /usr/lib/python3.7/multiprocessing/pool.py in get(self, timeout) 655 return self._value 656 else: --> 657 raise self._value 658 659 def _set(self, i, obj):
TypeError: seasonal_decompose() got an unexpected keyword argument 'period'
"""
Which is odd bc I use seasonal decompose and know it has a period argument..
This happens on all tutorials or examples when opening in collab..
Do you have an example of implementation with forecasts/tags you already have or could you please fix the examples?
Hi @Forecastlife! Thank you very much for letting us know about the issue.
The problem arises from the statsmodels
version and is related to StatsForecast
. By default, colab
has the 0.10.2
version of statsmodels
which does not include the period
argument.
To solve the issue, you can run pip install -U statsmodels
at the beginning of the notebook to update statsmodels
to the most recent version.
We have updated the examples to include the line. (#35)
Regarding the format of Y_hat_df
, it's a pandas dataframe indexed by each time series, includes a ds
column containing the forecast horizon and a column for each model.

Please let us know if the problem persists.