Object
InformationGainSegmentation
Information Gain based Temporal Segmentation (IGTS) Estimator.
Quickstart
python
from sktime.detection.igts import InformationGainSegmentation
estimator = InformationGainSegmentation(k_max: int=10, step: int=5)Parameters(2)
- k_max: int, default=10
- Maximum number of change points to find. The number of segments is thus k+1.
- step:int, default=5
Step size, or stride for selecting candidate locations of change points. Fox example a
step=5would produce candidates [0, 5, 10, …]. Has the same meaning asstepinrangefunction.
Examples
>>> from sktime.detection.datagen import piecewise_normal_multivariate
>>> from sklearn.preprocessing import MinMaxScaler
>>> X = piecewise_normal_multivariate (
... lengths = [10, 10, 10, 10 ],
... means = [[0.0, 1.0 ], [11.0, 10.0 ], [5.0, 3.0 ], [2.0, 2.0 ]],
... variances = 0.5,
... )
>>> X_scaled = MinMaxScaler (feature_range = (0, 1)). fit_transform (X)
>>> from sktime.detection.igts import InformationGainSegmentation
>>> igts = InformationGainSegmentation (k_max = 3, step = 2)
>>> y = igts. fit_predict (X_scaled)References
- [1 ] (1, 2) Sadri, Amin, Yongli Ren, and Flora D. Salim. “Information gain-based metric for recognizing transitions in human activities.”, Pervasive and Mobile Computing, 38, 92-109, (2017). https://www.sciencedirect.com/science/article/abs/pii/S1574119217300081