Number of changepoints parameter
Hi,
I have noticed a "n_changepoints" parameter. Could you please clarify how this works?
What would potentially change at these "Change points". Only trend? Or any other parameters.
Thank you, Deniz
This is discussed briefly in the first section of https://facebook.github.io/prophet/docs/trend_changepoints.html . It is the number of places at which the trend is allowed to change (the dashed lines in the first figure on that page). Further clarification on how that works I hope is in that page there, but let me know if there is something there that isn't clear.
It affects only the trend, not the seasonality or other linear components.
Can you please clarify below statement? What is meant by adjusting the regularization? How would we execute that?
"The number of potential changepoints can be set using the argument n_changepoints, but this is better tuned by adjusting the regularization."
Instead of allowing the trend to change at 25 points (the default), you could for instance cut that down to 5 - the trend now is more restricted in its ability to change.
One might consider doing this to make sure the trend doesn't overfit, but a better way to restrict the trend and make sure it doesn't overfit is to reduce the changepoint_prior_scale parameter. This parameter is described later on in that same page of documentation, and there are some examples showing how it dampens trend changes.
I am, unfortunately working on 2 years of weekly data, so I only have two seasons in total and 104 data points maximum.
For such a case should I limit the n_changepoints to 1 or 2 in order to set a fixed yearly trend?
Deniz
You can set n_changepoints=0 to get a linear trend without any changepoints.
This seems to be resolved but please reopen if there are additional questions along this line.