facebook / facebook/prophet

Cross validation with multiple conditional seasonality not working

Open
#2,029 1 comment 2 reactions 0 assignees View on GitHub
bug py
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

Hello,

I'm coming back to the issue #1733 as I faced same situation as @natashanorsker describes there. I'd say the issue arises when you want to add more than one seasonality type and there is a condition there.

My use case is a volume forecasting and because of covid, I created an interval for its hardest impact (exactly same approach of the season on/off described [here](https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html#seasonalities-that-depend-on-other-factors)). In my case, I need to contemplate weekly and yearly seasonality, and for both apply the condition covid_on / off. When moving to cross-validation, I get same error than in #1733. If I try cross-validation with only one of the seasonality linked to condition (e.g. weekly) it works.

I stressed the example provided by @bletham and instead running it only for one seasonality type (weekly), I also added the yearly (even if I'm not entirely sure makes sense for the use case itself, but only for validation purposes). Result is that for only one it works, but for two, returns the same error as @natashanorsker and I got.
Some screenshots to illustrate my words:

1. Example with only one, it works:
![image](https://user-images.githubusercontent.com/90398827/133739692-db46231b-e304-48f7-a776-fbaa44ef4200.png)

2. Example with two, it returns an error:

![image](https://user-images.githubusercontent.com/90398827/133739913-509d5b17-4e8d-423f-82d7-abfb367222b9.png)
![image](https://user-images.githubusercontent.com/90398827/133739976-25a2a435-6edb-4c72-9bc0-c58927b4c398.png)

Version installed:
• pandas 1.2.4
• prophet 1.0

Brgrds,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.