tslearn.metrics¶
The tslearn.metrics
module delivers timeseries specific metrics to be
used at the core of machine learning algorithms.
User guide: See the Dynamic Time Warping (DTW) section for further details.
Functions

Compute crosssimilarity matrix using Dynamic Time Warping (DTW) similarity measure. 

Compute crosssimilarity matrix using Global Alignment kernel (GAK). 

Compute Canonical Time Warping (CTW) similarity measure between (possibly multidimensional) time series and return the similarity. 

Compute Canonical Time Warping (CTW) similarity measure between (possibly multidimensional) time series and return the alignment path, the canonical correlation analysis (sklearn) object and the similarity. 

Compute Dynamic Time Warping (DTW) similarity measure between (possibly multidimensional) time series and return it. 

Compute Dynamic Time Warping (DTW) similarity measure between (possibly multidimensional) time series and return both the path and the similarity. 

Compute Dynamic Time Warping (DTW) similarity measure between (possibly multidimensional) time series using a distance metric defined by the user and return both the path and the similarity. 

Compute Dynamic Time Warping (DTW) similarity measure between (possibly multidimensional) time series under an upper bound constraint on the resulting path length and return the similarity cost. 

Compute Dynamic Time Warping (DTW) similarity measure between (possibly multidimensional) time series under an upper bound constraint on the resulting path length and return the path as well as the similarity cost. 

Compute the optimal path through an accumulated cost matrix given the endpoint of the sequence. 

Compute the accumulated cost matrix score between a subsequence and a reference time series. 

Compute subsequence Dynamic Time Warping (DTW) similarity measure between a (possibly multidimensional) query and a long time series and return both the path and the similarity. 

Compute the Longest Common Subsequence (LCSS) similarity measure between (possibly multidimensional) time series and return the similarity. 

Compute the Longest Common Subsequence (LCSS) similarity measure between (possibly multidimensional) time series and return both the path and the similarity. 

Compute the Longest Common Subsequence (LCSS) similarity measure between (possibly multidimensional) time series using a distance metric defined by the user and return both the path and the similarity. 

Compute Global Alignment Kernel (GAK) between (possibly multidimensional) time series and return it. 

Compute SoftDTW metric between two time series. 

Compute SoftDTW metric between two time series and return both the similarity measure and the alignment matrix. 

Compute crosssimilarity matrix using SoftDTW metric. 

Compute crosssimilarity matrix using a normalized version of the SoftDTW metric. 

Compute timeseries envelope as required by LB_Keogh. 

Compute LB_Keogh. 

Compute sigma value to be used for GAK. 

Compute gamma value to be used for GAK/SoftDTW. 

SoftDTW loss function in PyTorch. 