Back to models
Transformer

IntervalSegmenter

Unequal lengthUnequal length removes

Interval segmentation transformer.

Quickstart

python
from sktime.transformations.segment import IntervalSegmenter

estimator = IntervalSegmenter(intervals=10)

Parameters(1)

intervalsint, np.ndarray or list of np.ndarrays

Number or positions of intervals to generate.

  • If int, intervals gives the number of generated intervals.

  • If ndarray, 2d np.ndarray [n_intervals, 2] with rows giving intervals, the first column giving start points, and the second column giving end points of intervals

  • If list of ndarrays, applied to each column of X, where each entry in the list is a 2d np.ndarray [n_intervals, 2] with rows giving intervals, the first column giving start points, and the second column giving end points of intervals.

Examples

>>> from sktime.utils._testing.panel import _make_panel
>>> from sktime.transformations.segment import IntervalSegmenter
>>> X = _make_panel ()
>>> t = IntervalSegmenter ()
>>> Xt = t. fit_transform (X)