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

daily seasonality doesn't seem to fit properly #2056

Open
sarah-mbs opened this issue Nov 3, 2021 · 1 comment
Open

daily seasonality doesn't seem to fit properly #2056

sarah-mbs opened this issue Nov 3, 2021 · 1 comment
Labels

Comments

@sarah-mbs
Copy link

Hi everyone!

I'm facing a problem with my model. I need to predict the number of calls that my company will receive for the next month. For that, I have data from 2019 to october 2021. It is separated in intervals of 30 min each, and I have a restriction of time: i need only predictions from 8h to 23h (which is also the period of the day that i have data for). I'm quite new when it comes to forecast something, but this is my code: https://github.com/sarah-mbs/prophet.git

The problem is that i have two types of seasonality: daily and weekly. Weekly works fine, but when it comes to daily, the model predicts less calls than the actual values. I'm not really sure why this is happening. On the code you can see that i've tried different methods to solve it, but none of them works. This is the actual values vs predicted:

image

And these are the components:

image

Does anyone has any idea of how i can improve my model?

Another problem is that I can't have negative calls, but the models predicts negative values. The solution I found here was to clip those values to 0, but i'm not really sure if this was the best solution. If anyone has a different approach to this I would love to look as well.

@tcuongd
Copy link
Collaborator

tcuongd commented Nov 22, 2021

Hmm it's also interesting that the trend is increasing even though the series looks to be fairly flat. I would try the following:

  • Use growth='flat'
  • Set seasonality_prior_scale=20.0 (the default is 10.0) to make the data fit more to the seasonal patterns. You can make this value higher for a stronger fit.

Regarding negative predictions, the best method for now is to clip to 0. There's a more detailed discussion of different error distributions and trend functions that try to solve this issue here: #1668

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