tslearn.metrics.lb_envelope¶

tslearn.metrics.
lb_envelope
(ts, radius=1)[source]¶ Compute timeseries envelope as required by LB_Keogh.
LB_Keogh was originally presented in [1].
Parameters:  ts : arraylike
Timeseries for which the envelope should be computed.
 radius : int (default: 1)
Radius to be used for the envelope generation (the envelope at time index i will be generated based on all observations from the time series at indices comprised between iradius and i+radius).
Returns:  arraylike
Lowerside of the envelope.
 arraylike
Upperside of the envelope.
See also
lb_keogh
 Compute LB_Keogh similarity
References
[1] Keogh, E. Exact indexing of dynamic time warping. In International Conference on Very Large Data Bases, 2002. pp 406417. Examples
>>> ts1 = [1, 2, 3, 2, 1] >>> env_low, env_up = lb_envelope(ts1, radius=1) >>> env_low array([[1.], [1.], [2.], [1.], [1.]]) >>> env_up array([[2.], [3.], [3.], [3.], [2.]])