Back to models
Transformer

EAgglo

Hierarchical agglomerative estimation of multiple change points.

E-Agglo is a non-parametric clustering approach for multivariate timeseries[R7d39cf41170f-1]_, where neighboring segments are sequentially merged_ to maximize a goodness-of-fit statistic. Unlike most general purpose agglomerative clustering algorithms, this procedure preserves the time ordering of the observations.

This method can detect distributional change within an independent sequence, and does not make any distributional assumptions (beyond the existence of an alpha-th moment). Estimation is performed in a manner that simultaneously identifies both the number and locations of change points.

Quickstart

python
from sktime.detection.eagglo import EAgglo

estimator = EAgglo(member=None, alpha=1.0, penalty=None)

Tags

Capabilities

  • Multivariate
  • Unequal-length series
  • Inverse transform: Not supported
  • Missing values: Not supported
  • Removes missing values: Not supported
  • Equalizes series length: 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(3)

memberarray_like (default=None)

Assigns points to the initial cluster membership, therefore the first dimension should be the same as for data. If None it will be initialized to dummy vector where each point is assigned to separate cluster.

alphafloat (default=1.0)

Fixed constant alpha in (0, 2] used in the divergence measure, as the alpha-th absolute moment, see equation (4) in [1].

penaltystr or callable or None (default=None)

Function that defines a penalization of the sequence of goodness-of-fit statistic, when overfitting is a concern. If None not penalty is applied. Could also be an existing penalty name, either len_penalty or mean_diff_penalty.

Examples

>>> from sktime.detection.datagen import piecewise_normal_multivariate
>>> X = piecewise_normal_multivariate (means = [[1, 3 ], [4, 5 ]], lengths = [3, 4 ],
... random_state = 10)
>>> from sktime.detection.eagglo import EAgglo
>>> model = EAgglo ()
>>> model. fit_transform (X) array([0, 0, 0, 1, 1, 1, 1])

References

[1] (1,2)

Matteson, David S., and Nicholas A. James. “A nonparametric approach for

multiple change point analysis of multivariate data.” Journal of the American Statistical Association 109.505 (2014): 334-345.

[2]

James, Nicholas A., and David S. Matteson. “ecp: An R package for

nonparametric multiple change point analysis of multivariate data.” arXiv preprint arXiv:1309.3295 (2013).