tsseg.algorithms.ggs package
GGS — Greedy Gaussian Segmentation.
Description
GGS segments a multivariate time series by modelling each segment as i.i.d. samples from a multivariate Gaussian distribution. The algorithm maximises the total log-likelihood minus a covariance-regularisation term \(\lambda\). A greedy dynamic-programming search finds an approximate solution in linear time.
The maximum number of change points k_max is an upper bound; the algorithm
may return fewer if additional splits do not improve the regularised likelihood.
Parameters
Name |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
Maximum number of change points. |
|
float |
|
Regularisation \(\lambda\) (>= 0). Controls covariance shrinkage. |
|
int |
|
Maximum number of shuffles during the greedy search. |
|
bool |
|
Print progress information. |
|
int / None |
|
Random seed. |
Usage
from tsseg.algorithms import GreedyGaussianDetector
detector = GreedyGaussianDetector(k_max=8, lamb=1.0)
labels = detector.fit_predict(X)
Implementation: Adapted from aeon. BSD 3-Clause.
Reference: Hallac, Nystrup & Boyd (2019), Greedy Gaussian Segmentation of Multivariate Time Series, Advances in Data Analysis and Classification.