Linear trend with unknown number of changepoints

Is there a simple example of linear trend in a time series with unknown number of change points? I looked into prophet model but this number seems to be provided externally as the number of change points S is in the data block.

Thank you,

There’s no tractable way to allow an arbitrary number of change points because inference is polynomial to the degree of the number of change points (i.e., linear for one change point, quadratic for two, and so on).

One way people try to get around this problem is to use a time trend with more variance (e.g., going to a Student-t noise model with low degrees of freedom to accommodate big jumps instead of using a normal distribution).

I agree with Bob, but I’ll just add that depending on the goal of your analysis, a different option could be to fit multiple models with different numbers of change points and do model comparison (potentially choosing one model or doing model averaging). But I wouldn’t do that if you’re doing causal inference, for example.

1 Like