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

Custom conditional seasonality: adding condition_name is giving error #1676

Open
manishagupta15 opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@manishagupta15
Copy link

https://neuralprophet.com/how-to-guides/feature-guides/conditional_seasonality_peyton.html

df["ds"] = pd.to_datetime(df["ds"])
df["on_season"] = df["ds"].apply(lambda x: x.month in [9, 10, 11, 12, 1])
df["off_season"] = df["ds"].apply(lambda x: x.month not in [9, 10, 11, 12, 1])

m = NeuralProphet(weekly_seasonality=False)
m.set_plotting_backend("plotly-static")
m.add_seasonality(name="on_season", period=7, fourier_order=3, condition_name="on_season")
m.add_seasonality(name="off_season", period=7, fourier_order=3, condition_name="off_season")
metrics = m.fit(df, freq="D")

adding conditional_seasonlity in the code, I am getting error that " TypeError: add_seasonality() got an unexpected keyword argument 'condition_name'. can you please help. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant