pyts.metrics.itakura_parallelogram¶
-
pyts.metrics.itakura_parallelogram(n_timestamps, max_slope=2.0)[source]¶ Compute the Itakura parallelogram.
Parameters: - n_timestamps : int
The size of both time series.
- max_slope : float (default = 2.)
Maximum slope for the parallelogram.
Returns: - region : array, shape = (2, n_timestamps)
Constraint region. The first row consists of the starting indices (included) and the second row consists of the ending indices (excluded) of the valid rows for each column.
Examples
>>> from pyts.metrics import itakura_parallelogram >>> print(itakura_parallelogram(5)) [[0 1 1 2 4] [1 3 4 4 5]]