Zurück zu den Modellen
Object

InformationGainSegmentation

Information Gain based Temporal Segmentation (IGTS) Estimator.

IGTS is a n unsupervised method for segmenting multivariate time series into non-overlapping segments by locating change points that for which the information gain is maximized.

Information gain (IG) is defined as the amount of entropy lost by the segmentation. The aim is to find the segmentation that have the maximum information gain for a specified number of segments.

IGTS uses top-down search method to greedily find the next change point location that creates the maximum information gain. Once this is found, it repeats the process until it finds k_max splits of the time series.

Note

IGTS does not work very well for univariate series but it can still be used if the original univariate series are augmented by an extra feature dimensions. A technique proposed in the paper [1] us to subtract the series from it’s largest element and append to the series.

Schnellstart

python
from sktime.detection.igts import InformationGainSegmentation

estimator = InformationGainSegmentation(k_max: int=10, step: int=5)

Parameter(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=5 would produce candidates [0, 5, 10, …]. Has the same meaning as step in range function.

Beispiele

>>> 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)

Referenzen

[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