Prophet Model method taking longer time to run when we do model.add_seasonality(name='yearly', period=365.25, fourier_order=20)

Open
#2,652 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reproducing the provided Prophet configuration with the 26k-row sales dataset and compare runtime with and without model.add_seasonality(name='yearly', period=365.25, fourier_order=20). Measure the effect of the yearly Fourier order alongside the monthly and weekly seasonalities, then define completion as a documented way to reduce runtime without materially reducing prediction accuracy.

Written by the indexing model from the issue text.

Description

Trying to create a forecasting model with having sales data of 26k with parameters as provided.
its taking much longer time to run when we add seasonality name yearly with fourier order =20 and this parameters is the best parameter that are giving me good accuracy with better sales prediction on Holidays and on Sales days.
Note here holidays is data frame of Sales days it has columns like [sales_day_name, ds, lower_window, upper_window. ]

model = Prophet(
           growth='linear',
           holidays=holidays,
           seasonality_mode='multiplicative',
           changepoint_prior_scale=0.05,
           seasonality_prior_scale=35,
           holidays_prior_scale=20,
           interval_width=0.75,
           daily_seasonality=False, # set False bcz not to take auto value since found best value through best_param method(and found fourier order = 12)
           weekly_seasonality=False,  # set False bcz not to take auto value since found best value through best_param method(and found fourier order = 20)
           yearly_seasonality=False,   # set False bcz not to take auto value since found best value through best_param method(and found fourier order = 20)
       ).add_seasonality(name='monthly', period=30.5, fourier_order=12)
       model.add_seasonality(name='weekly', period=7, fourier_order=20)
       model.add_seasonality(name='yearly', period=365.25, fourier_order=20)

And when I remove the yearly seasonality it will runs very fast but that decreases the accuracy of model sales prediction.

How can I reduce the run time without decreasing the Sales prediction accuracy?

Dominant language
Python
Stars
20.5k
Forks
4.6k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from facebook/prophet

All issues in facebook/prophet

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.