Zurück zu den Modellen
Detector

CROPS

CROPS algorithm for path solutions to the PELT algorithm.

Solves for all penalised optimal partitionings within [min_penalty, max_penalty] using CROPS [1], then selects the best segmentation via BIC or elbow criterion.

Schnellstart

python
from sktime.detection.crops import CROPS

estimator = CROPS(cost, min_penalty, max_penalty, selection_method='bic', min_segment_length=1, step_size=1, split_cost=0.0, prune=True, pruning_margin=0.0, middle_penalty_nudge=1e-05)

Parameter(10)

costBaseIntervalScorer
Cost function.
min_penaltyfloat
Lower bound of penalty range.
max_penaltyfloat
Upper bound of penalty range.
selection_methodstr, default=”bic”

"bic" or "elbow".

min_segment_lengthint, default=1
Minimum segment length.
step_sizeint, default=1
JumpPELT step size.
split_costfloat, default=0.0
Additive split cost.
prunebool, default=True
Enable pruning.
pruning_marginfloat, default=0.0
Pruning margin.
middle_penalty_nudgefloat, default=1e-5
Nudge factor for threshold penalties.

Beispiele

>>> from sktime.detection.crops import CROPS
>>> from sktime.detection.costs._l2_cost import L2Cost
>>> import numpy as np
>>> X = np. concatenate ([np. zeros (50), 10 * np. ones (50)])
>>> det = CROPS (cost = L2Cost (), min_penalty = 0.5, max_penalty = 50.0)
>>> det. fit (X). predict (X)

Referenzen

[1]

Haynes, K., Eckley, I. A. & Fearnhead, P. (2017). Computationally efficient changepoint detection for a range of penalties. JCGS, 26(1), 134-143.