Hello everyone,
i am currently writing a masters thesis about forecasts and among others i am using Prophet for some forecasts.
I already played a lot with the modell parameters in R (Especially seasonality.prior.scale , changepoint.prior.scale, n.changepoints and holidays.prior.scale). I tried to select the parameter values that lead to the most accurate forecasts. But i am still not able to interprete the values which i chose for the parameters. For example, i know, if I decrease "holidays.prior.scale", then holiday effects will be dampened. But i can not interprete and understand it perfectly. What exactly does it mean if "holidays.prior.scale" will be set to 10? Or to 0.5? How can we interprete all this parameter values and in which intervall could the paramters lie?
I didn't find the exact interpretations for that in the paper or on github. Is this written down somewhere and did i miss it maybe?
Would be very happy and thankful about any answer!
Best regards,
maxwell
The seasonality scale is the standard deviation of the prior distribution for the coefficients of the Fourier terms, _Beta_.
_Beta = Norma(0, sigma^2)_
The prior scale is sigma in this case. The coefficients of the sine and cosine terms are the priors drawn from this distribution. The larger the prior, the wider the distribution, the more flexibility the seasonal component has.
Here is another explanation for it.
@sammo , Thank you for this answer ! :)
What about the other parameters, especially "changepoint.prior.scale", "n.changepoints" and "holidays.prior.scale" ? Do you have some explanations for the interpretation of them, too? Or is it maybe written down somewhere?
Thank you again in advance!
A general description of each parameter is given in the reference manual for the prophet function: https://cran.r-project.org/web/packages/prophet/prophet.pdf#page.13
For a mathematical description of the model, you could look at Section 3 of the paper: https://peerj.com/preprints/3190.pdf
For instance it describes how changepoint magnitudes are given a Laplace prior with scale parameter tau (Section 3.1.3); this is the changepoint prior scale. Section 3.2 describes a Normal prior for the seasonality components with stdev sigma; this is the seasonality.prior.scale. The holiday prior is the same and is described in Section 3.3.
The other reference that would be useful for understanding the model is the Stan code, which is generally meant to be interpretable and read like a Bayesian generative model. You can see these priors here:
https://github.com/facebook/prophet/blob/0a270b4a19cafb084e5ed6ee0cf942198d4c913b/R/inst/stan/prophet.stan#L111
https://github.com/facebook/prophet/blob/0a270b4a19cafb084e5ed6ee0cf942198d4c913b/R/inst/stan/prophet.stan#L113
Most helpful comment
A general description of each parameter is given in the reference manual for the
prophetfunction: https://cran.r-project.org/web/packages/prophet/prophet.pdf#page.13For a mathematical description of the model, you could look at Section 3 of the paper: https://peerj.com/preprints/3190.pdf
For instance it describes how changepoint magnitudes are given a Laplace prior with scale parameter tau (Section 3.1.3); this is the changepoint prior scale. Section 3.2 describes a Normal prior for the seasonality components with stdev sigma; this is the seasonality.prior.scale. The holiday prior is the same and is described in Section 3.3.
The other reference that would be useful for understanding the model is the Stan code, which is generally meant to be interpretable and read like a Bayesian generative model. You can see these priors here:
https://github.com/facebook/prophet/blob/0a270b4a19cafb084e5ed6ee0cf942198d4c913b/R/inst/stan/prophet.stan#L111
https://github.com/facebook/prophet/blob/0a270b4a19cafb084e5ed6ee0cf942198d4c913b/R/inst/stan/prophet.stan#L113