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

[BUG] After calling fbporphet model.fit(), no forecasts all null #85

Open
PeggyFan opened this issue Oct 27, 2021 · 0 comments
Open

[BUG] After calling fbporphet model.fit(), no forecasts all null #85

PeggyFan opened this issue Oct 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@PeggyFan
Copy link

PeggyFan commented Oct 27, 2021

Describe the bug
I ran the fbprophet model

clf = HTSRegressor(model='prophet', revision_method='AHP', n_jobs=5)
model = clf.fit(df, hierarchy, exogenous=exogenous)
model.hts_result.forecasts

but it returned:
{}

So naturally all the predictions returned nan.

I have successfully ran a two level model, but not sure why three level hierarchy here isn't working.

To Reproduce
Steps to reproduce the behavior:
df:

reporting_day | total | Flowers | Flowers-01 | Flowers-02 | flowers_promo_pct
2021-05-01 | 36517.00000 | 36517.00000 | 31696.00000 | 4821.00000 | 0.03000
2021-05-02 | 80410.00000 | 80410.00000 | 52164.00000 | 28246.00000 | 0.92000
2021-05-03 | 35210.00000 | 35210.00000 | 28169.00000 | 7041.00000 | 0.02000
2021-05-04 | 52560.00000 | 52560.00000 | 36546.00000 | 16014.00000 | 0.02000
2021-05-05 | 37549.00000 | 37549.00000 | 32744.00000 | 4805.00000 | 0.73000

hierarchy:

{'total': ['Flowers'],
 'Flowers': ['Flowers-01',
  'Flowers-01']}

exogenous:

{'Flowers-01': ['flowers_promo_pct'],
 'Flowers-02': ['flowers_promo_pct'],
 'Flowers': ['flowers_promo_pct'],
 'total': ['flowers_promo_pct']}

Expected behavior
I believe the inputs to the model.fit() are in the correct format. So after I called fit() there should be forecasts under
model.hts_result.forecasts

Desktop (please complete the following information):

  • OS: OS X Catalina
  • scikit-hts version: 0.5.11
  • Python version: 3.8.6

Additional context
Anyone who can spot something wrong with my code, please do share your insights!

@PeggyFan PeggyFan added the bug Something isn't working label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant