-
Hi All, I'm very new to MMMs and PyMC in particular, so apologies if this is obvious. Regarding the yearly_seasonality parameter of DelayedSaturatedMMM, how should this be interpreted? I see in the docstring that it specifies the "Number of Fourier modes". Does this mean it is the number of 'peaks' we would expect to see over a year? In relation to this, does it matter whether the data inputted is weekly, daily or otherwise? If the answer to the above is 'yes' then I guess it does not make a difference, but just to clarify. Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
wd60622
Oct 26, 2023
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wd60622
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The fourier transformations happen based on the day of the year derived from the dates so the frequency of the input data will not have an impact.
With yearly_seasonality=3, all the sin and cos shown below will be part of the regression model. Here they are unscaled but the regression scales each by a parameter (highly regularized). The scaled curves will be summed together which provide the seasonality that can be rather flexible but also repeats yearly.
It's not guaranteed that n_order = n will have n peaks when multiplied with the coefficients and summed. That would depend on the coefficients. For a counter example, we can see only 3 local maximums with order = 4 below.
However, the o…