Regularizing changepoints
As stated earlier, Prophet will place 25 potential changepoints in the first 80% of the time series by default. To control Prophet's automatic changepoint detection, you can modify both of these values with the n_changepoints
and changepoint_range
arguments during model instantiation. For example, changing the number of potential changepoints to five is done like this:
model = Prophet(seasonality_mode='multiplicative', Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â yearly_seasonality=4, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â n_changepoints=5)
This results in five evenly spaced potential changepoints in the first 80% of the data, as shown here:
Or, you could instead force all 25 changepoints to lie not in the first 80% of data, but rather in the first 50%:
model...