deepcharles / ruptures

ruptures: change point detection in Python
BSD 2-Clause "Simplified" License
1.54k stars 160 forks source link

Algorithm and threshold advice for piecewise linear #297

Open water-e opened 1 year ago

water-e commented 1 year ago

I have a signal as shown in the picture below (black line, red is a truth I'm trying to reconstruct). My desired outcome is to discover one change point around t=47.5. The structural breaks are scalar shifts or as shown here "fast slide" of overall magnitude 2*pi. The slow climbing slope is not known, but it persists. I can't rely on there being one break, but the scales in the picture are pretty reliable (slope vs 2 pi shift vs +/- 1 pi noise).

If I working manually, I could find a linear trend based on trial and error that makes the plot piecewise constant. In that case, even though I have trouble interpreting the costs and scores, it isn't hard to find parameters that work.

Any advice on model? I tried linear. The only issue is to try to interpret the costs and parameters that are reasonable compared to what I know. -thanks

image