tslearn.metrics.subsequence_cost_matrix¶
- tslearn.metrics.subsequence_cost_matrix(subseq, longseq, be=None)[source]¶
Compute the accumulated cost matrix score between a subsequence and a reference time series.
- Parameters:
- subseqarray-like, shape=(sz1, d) or (sz1,)
Subsequence time series. If shape is (sz1,), the time series is assumed to be univariate.
- longseqarray-like, shape=(sz2, d) or (sz2,)
Reference time series. If shape is (sz2,), the time series is assumed to be univariate.
- beBackend object or string or None
Backend. If be is an instance of the class NumPyBackend or the string “numpy”, the NumPy backend is used. If be is an instance of the class PyTorchBackend or the string “pytorch”, the PyTorch backend is used. If be is None, the backend is determined by the input arrays. See our dedicated user-guide page for more information.
- Returns:
- matarray-like, shape=(sz1, sz2)
Accumulated cost matrix.
Examples using tslearn.metrics.subsequence_cost_matrix
¶
sDTW multi path matching