Back to models
Transformer

IntervalSegmenter

Unequal-length seriesEqualizes series length

Interval segmentation transformer.

Quickstart

python
from sktime.transformations.segment import IntervalSegmenter

estimator = IntervalSegmenter(intervals=10)

Tags

Capabilities

  • Unequal-length series
  • Equalizes series length: Supported
  • Multivariate: Not supported
  • Inverse transform: Not supported
  • Missing values: Not supported
  • Removes missing values: Not supported

Properties

Input typescitype:transform-input
Series
Output typescitype:transform-output
Series
Label typescitype:transform-labels
None
Fit is emptyfit_is_empty
No
Keeps the time indextransform-returns-same-time-index
No
Requires Xrequires_X
Yes
Requires yrequires_y
No
X and y need the same indexX-y-must-have-same-index
No

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)