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

Force prediction to be positive #2023

Closed
Lufffya opened this issue Sep 10, 2021 · 2 comments
Closed

Force prediction to be positive #2023

Lufffya opened this issue Sep 10, 2021 · 2 comments
Labels

Comments

@Lufffya
Copy link

Lufffya commented Sep 10, 2021

Thank you for providing such a powerful tool !!!

But i met a problem

The forecast is negative, so I can't use it

I've seen some of the same issues before, is there any way to solve this problem now ?

@tcuongd
Copy link
Collaborator

tcuongd commented Sep 11, 2021

Hey, Ben summarises the strategies for positive predictions here: #1668 (comment)

There is no functionality baked in to Prophet to do this, you'll want to either:

  • Clip the predictions manually (np.clip(preds, 0)), or
  • If the trend uncertainty is important and you want to show that it can become positive again, use the ProphetPos class that is written in that post.

@Lufffya
Copy link
Author

Lufffya commented Sep 13, 2021

Thank you. It's very useful to me

@Lufffya Lufffya closed this as completed Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants