-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Changing Fourier order in seasonality #667
Comments
Fourier order determines how narrow spikes yearly (and weekly) component can capture. Try very large values and you might see seasonality changing more rapidly (but possibly overfitting some noise). I think prior scale affects the height of the seasobality bumps whereas the order affects the width |
+1 for what @vhpietil says, and also this is described in the documentation with an example about midway down in https://facebook.github.io/prophet/docs/seasonality,_holiday_effects,_and_regressors.html |
In the documentation,it is mentioned that you have considered default values like 10 yearly seasonality and 3 for weekly seasonality and also mentioned that it can be changed based on the AIC values ,but for a basic user,how he can choose among different values for different time series data sets .Will it be ok to leave the Fourier order to default and also under what situations they can be changed. |
Like it says in the documentation, I’d expect in the majority of situations you can leave them at default values. I would only consider changing them if you plot the forecast and can see that there are sharp seasonal fluctuations that the seasonality is too smooth to fit. |
Thanks ,what if I have to build a generalized model for some data sets.How do I arrive to decide on changing the parameters and its range |
I think you'd have to experiment with it on your datasets. You can use the cross_validation function to assess model predictions as you change parameter values. |
can you please mention the range of fourier order that can be varied. |
It would really depend on the time series. My recommendation would be to (1) identify datasets where the forecast is performing poorly, (2) visualize the forecasts for those datasets, and (3) if it is performing poorly because seasonal fluctuations are more rapid than the seasonality is able to capture, increase the Fourier order until that is no longer the case. This is now a good upper bound for your search. My prior is that in most cases this number will not benefit much from tuning. |
Thank you for the reply. |
If you want to do this in an entirely automated way, then it's a hyperparameter optimization problem. What you describe is one strategy (grid search). Random search often works better (http://www.jmlr.org/papers/volume13/bergstra12a/bergstra12a.pdf) , or there are more sophisticated techniques that you can check out if you search for hyperparameter optimization but I wouldn't think them to be warranted in this situation. |
what range of values should you normally stay within for Fourier order of the seasonalities and for change prior scale when forecasting time series with prophet? |
@kenny1901 see #1009, which has some discussion on this topic. (and #660 is to provide better documentation for this) |
I have tried to change Fourier order for yearly and weekly seasonality on the scale of 1.For some data sets there is little but if change in accuracy.Are the default values reliable for forecast.
and also,how changing Fourier order differs from changing seasonality.prior.scale
Thanks
The text was updated successfully, but these errors were encountered: