frechet_accumulated_matrix#
- tslearn.metrics.frechet_accumulated_matrix(s1, s2, mask, be=None)[source]#
Compute the Frechet accumulated cost matrix score between two time series.
It is not required that both time series share the same size, but they must be the same dimension.
- Parameters:
- s1array-like, shape=(sz1,) or (sz1, d)
First time series.
- s2array-like, shape=(sz2,) or (sz2, d)
Second time series.
- maskarray-like, shape=(sz1, sz2)
Mask used to constrain the region of computation. Unconsidered cells must have False values.
- 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. Non computed cells due to masking have infinite value.