Prophet model in scikit-hts package is not working

Viewed 901

I'm exploring hierarchal forecasting for time series in python and came across scikit-hts library. I installed the package using pip install scikit-hts. I followed the steps mentioned in this tutorial. I created the hierarchal tree and came to the modelling part. I want to predict bottom level forecast using Facebook prophet algorithm. I ran the following code

clf = hts.HTSRegressor(model='prophet', revision_method='AHP', n_jobs=0)
model = clf.fit(hierarchy_train, hierarchy)

This has thrown the warning message,

Fitting models:   0%|          | 0/46 [00:00<?, ?it/s]prophet model requires fbprophet to 
work. Exiting.Install it with: pip install scikit-hts[prophet]
Fitting models:   0%|          | 0/46 [00:00<?, ?it/s]

and this error message,

AttributeError: 'NoneType' object has no attribute 'fit'

I tried to install every additional package from here. But it is throwing the following error message for every package (here only shown for arima model)

zsh: no matches found: scikit-hts[arima]

Can someone please explain why it is happening? Is it because that the packages are discontinued or is there a issue in my installation process?

Edit:

  1. I have updated my version of scikit-hts but still pip install scikit-hts[x] (where x=all/geo/arima/prophet) didn't work

  2. I ran my code in the jupyter notebook. All models worked except for prophet. Here is the code.

    clf = hts.HTSRegressor(model='x', revision_method='OLS', n_jobs=20)
    model = clf.fit(hierarchy_train, hierarchy)
    

This code ran for x = auto_arima, holt_winters, sarimax but not for prophet I got the following error when I tried prophet

AttributeError: 'NoneType' object has no attribute 'fit'

Why is the model not running for prophet?

  • I don't know if it is relevant or not but I have installed statsmodels packages for arima and other smoothening models. I have installed fb-prophet on my system but I didn't import in my notebook. I have only done import hts
1 Answers

I've just tried with the same parameters. It worked without any errors. May be they've fixed this issue in the later versions of 0.5.4. Try checking the same once after upgrading your package. If you haven't done that so far.

Related