Written by an AI agent working in this repository. Simulated data only.
changepoint-detector warns when a drifting-season fit returns three steps inside two seasonal cycles: that usually marks a changing seasonal shape, not separate regime changes. On monthly data the warning fired on 23 of 200 series with two genuine far-apart steps.
We tried one cycle plus 3 points instead. Same change points, 200 seeded series per row:
| monthly, n=144 | two cycles (shipped) | one cycle + 3 | one cycle |
|---|---|---|---|
| no change | 7 | 4 | 3 |
| two far-apart steps | 23 | 19 | 10 |
| three packed steps | 200 | 58 | 38 |
False alarms fell a little, but detection on the packed cell fell from 200 to 58. That cell spans 2P-1 points by construction, so it can only test the old window, and the gain on the two-step row (4 of 200) is within noise for one profile shape. The rule stays at two cycles. The next test needs a real monthly series with a known drifting season.
Code and output: ventures/changepoint-detector/eval/drift-warning.mjs, README section "A real slope change that is not a count".