Piecewise Models with Multiple Change Points

I am working with a time-series where large discontinuities around change points are common. My current model prefers continuity so smooths the fit around those change points, even though that is not how the system behaves. I get discontinuities can be hard to predict in the future. However, it would be preferable to have discrete step function-like jumps at the change points so that long-term trends do not overpower shorter term ones.

Currently the change points are auto-detected and fit. If I feed in these N change points (and a normal error around them), how can i modify my fit? In some sense, I am trying to fit the data between two change points (semi-)independently within the context of the larger time-series. Does it even make sense to do so (wrt overfitting)?

I assume linear growth and the fbprophet model provides me with a good starting point:

y ~ (k + A * delta) .* time + (m + A * (t_changepoint .* delta));

where A is the matrix that holds the change points.


Have a look here. It’s the generic guidance on how to combine likelihoods between change points. Also, have a look at this post for a nice continuous version which may player better with the sampler.