Back to models
Detector

SeededBinarySegmentation

Seeded binary segmentation algorithm for changepoint detection.

Quickstart

python
from sktime.detection.seeded_binseg import SeededBinarySegmentation

estimator = SeededBinarySegmentation(change_score=None, penalty=None, max_interval_length=200, growth_factor=1.5, selection_method='greedy')

Parameters(5)

change_scoreBaseIntervalScorer, optional, default=CUSUM()
Change score (or cost, which is converted automatically).
penaltyfloat, np.ndarray, or None, default=None
Penalty for declaring a changepoint.
max_interval_lengthint, default=200
Maximum seeded interval length.
growth_factorfloat, default=1.5
Growth factor for successive interval lengths. Must be in (1, 2].
selection_methodstr, default=”greedy”

"greedy" or "narrowest".

Examples

>>> from sktime.detection.seeded_binseg import SeededBinarySegmentation
>>> import numpy as np
>>> X = np. concatenate ([np. zeros (100), 10 * np. ones (100), np. zeros (100)])
>>> det = SeededBinarySegmentation (penalty = 30)
>>> det. fit (X). predict (X)

References

  1. [1 ] Kovács, S. et al. (2023). Seeded binary segmentation. Biometrika, 110(1), 249-256.