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

Prophet can't be found in grid.py #55

Closed
amengjiao opened this issue Jul 1, 2023 · 8 comments
Closed

Prophet can't be found in grid.py #55

amengjiao opened this issue Jul 1, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@amengjiao
Copy link

Hello! I am running this code below from your medium article: https://towardsdatascience.com/introducing-scalecast-a-forecasting-library-pt-1-33b556d9b019

f.set_validation_length(6)

automatically tune and forecast with a series of models

models = ('mlr','knn','svr','xgboost','gbt','elasticnet','mlp', 'arima','prophet' )
for m in models:
f.set_estimator(m)
f.tune() # by default, will pull grids from Grids.py
f.auto_forecast()

I got this error: ModuleNotFoundError: No module named 'prophet'

@mikekeith52
Copy link
Owner

Hi!

Try:

pip install prophet

and try again. I don't include prophet as a required library because it has a lot of known installation issues.

@mikekeith52 mikekeith52 self-assigned this Jul 1, 2023
@amengjiao
Copy link
Author

Thank you so much Mike!

@amengjiao
Copy link
Author

Issued solved. Thank you!

@amengjiao amengjiao reopened this Jul 2, 2023
@amengjiao
Copy link
Author

amengjiao commented Jul 2, 2023

Hi Michael, could you please help with a further error with prophet? My data has 53 observations. After taking a first order differencing, now there are 52 observations. After I feed the data into the models by running the code below. Everything is good except an error with prophet:

Code:

f.set_validation_length(6)
models = ('mlr','knn','svr','xgboost','gbt','elasticnet','mlp', 'arima','prophet')
for m in models:
f.set_estimator(m)
f.tune() # by default, will pull grids from Grids.py
f.auto_forecast()

Error:

556 if floor is not None:
557     X["floor"] = floor

--> 558 X["y"] = self.y.to_list()
...
574 "does not match length of index "
575 f"({len(index)})"
576 )

ValueError: Length of values (52) does not match length of index (53)

Do you know what would possibly be the reason for the error?

Thank you so much!
Lily

@mikekeith52 mikekeith52 added the bug Something isn't working label Jul 2, 2023
@mikekeith52
Copy link
Owner

This looks like a bug. Give me second to look into it.

@mikekeith52
Copy link
Owner

I was able to reproduce the error and found the source of the issue. In the next update, this will be fixed. I could probably commit a new version today or tomorrow.

@amengjiao
Copy link
Author

Thank you Michael! Appreciate your help!

mikekeith52 added a commit that referenced this issue Jul 4, 2023
- Made an explicit error message when the RNN model does not have enough observations to evaluate (#58).
- Changed the title of the loss plot from the RNN model.
- Fixed how the prophet model creates its externals regressors dataframe to avoid a `ValueError` (#55).
- Fixed an error with the RNN model when forecast horizon is 1.
@mikekeith52
Copy link
Owner

Hi, this should be fixed with the new version of scalecast. Please upgrade is you have not already:

pip install --upgrade scalecast

Thanks for raising the issue!

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

2 participants