tsseg.algorithms.espresso package
ESPRESSO — Entropy and Shape-aware Time Series Segmentation.
Description
ESPRESSO exploits both entropy and temporal shape properties to segment multi-dimensional time series. The method builds a semantic density matrix from the matrix profile using an arc-curve expansion procedure:
Compute the matrix profile with
stumpy.Iteratively expand arc sets (controlled by
chain_len) to accumulate segment-boundary evidence.Detect peaks in the resulting density curve; peaks signal change points.
ESPRESSO differs from methods that focus exclusively on statistical or temporal properties.
n_segments required)Parameters
Name |
Type |
Default |
Description |
|---|---|---|---|
|
int |
|
Subsequence length for the matrix profile (>= 4). |
|
int |
|
Iterations for expanding arc sets. |
|
int / None |
|
Target number of segments (>= 2 at predict time). |
|
float |
|
Minimum spacing between peaks as a fraction of the series length. |
|
int |
|
Time axis. |
|
int / None |
|
Seed for the internal RNG. |
Usage
from tsseg.algorithms import EspressoDetector
detector = EspressoDetector(window_size=64, chain_len=5, n_segments=4)
labels = detector.fit_predict(X)
Implementation: Reimplemented from the original ESPRESSO paper. Origin: new code.
Reference: Deldari, Smith, Sadri & Salim (2020), ESPRESSO: Entropy and ShaPe awaRe timE-Series SegmentatiOn, UbiComp.