# Time series distances#

The `aeon.distances` module contains time series specific distance functions that can be used in aeon and scikit learn estimators. It also contains tools for extracting the alignment paths for a distance calculation between two series, and tools for finding all pairwise distances

## Dynamic Time Warping (DTW)#

 `dtw_distance`(x, y[, window, itakura_max_slope]) Compute the DTW distance between two time series. `dtw_pairwise_distance`(X[, y, window, ...]) Compute the DTW pairwise distance between a set of time series. `dtw_cost_matrix`(x, y[, window, ...]) Compute the DTW cost matrix between two time series. `dtw_alignment_path`(x, y[, window, ...]) Compute the DTW alignment path between two time series.

## Move-Split-Merge (MSM)#

 `msm_distance`(x, y[, window, independent, c, ...]) Compute the MSM distance between two time series. `msm_pairwise_distance`(X[, y, window, ...]) Compute the msm pairwise distance between a set of time series. `msm_cost_matrix`(x, y[, window, independent, ...]) Compute the MSM cost matrix between two time series. `msm_alignment_path`(x, y[, window, ...]) Compute the msm alignment path between two time series.

## Time Warp Edit (TWE)#

 `twe_distance`(x, y[, window, nu, lmbda, ...]) Compute the TWE distance between two time series. `twe_pairwise_distance`(X[, y, window, nu, ...]) Compute the TWE pairwise distance between a set of time series. `twe_cost_matrix`(x, y[, window, nu, lmbda, ...]) Compute the TWE cost matrix between two time series. `twe_alignment_path`(x, y[, window, nu, ...]) Compute the TWE alignment path between two time series.

## Weighted Dynamic Time Warping (DTW)#

 `wdtw_distance`(x, y[, window, g, ...]) Compute the WDTW distance between two time series. `wdtw_pairwise_distance`(X[, y, window, g, ...]) Compute the WDTW pairwise distance between a set of time series. `wdtw_cost_matrix`(x, y[, window, g, ...]) Compute the WDTW cost matrix between two time series. `wdtw_alignment_path`(x, y[, window, g, ...]) Compute the WDTW alignment path between two time series.

## Derivative Dynamic Time Warping (DDTW)#

 `ddtw_distance`(x, y[, window, itakura_max_slope]) Compute the DDTW distance between two time series. `ddtw_pairwise_distance`(X[, y, window, ...]) Compute the DDTW pairwise distance between a set of time series. `ddtw_cost_matrix`(x, y[, window, ...]) Compute the DDTW cost matrix between two time series. `ddtw_alignment_path`(x, y[, window, ...]) Compute the ddtw alignment path between two time series.

## Weighted Derivative Dynamic Time Warping (WDDTW)#

 `wddtw_distance`(x, y[, window, g, ...]) Compute the WDDTW distance between two time series. `wddtw_pairwise_distance`(X[, y, window, g, ...]) Compute the WDDTW pairwise distance between a set of time series. `wddtw_cost_matrix`(x, y[, window, g, ...]) Compute the WDDTW cost matrix between two time series. `wddtw_alignment_path`(x, y[, window, g, ...]) Compute the WDDTW alignment path between two time series.

## Longest Common Subsequence (LCSS)#

 `lcss_distance`(x, y[, window, epsilon, ...]) Return the LCSS distance between x and y. `lcss_pairwise_distance`(X[, y, window, ...]) Compute the LCSS pairwise distance between a set of time series. `lcss_cost_matrix`(x, y[, window, epsilon, ...]) Return the LCSS cost matrix between x and y. `lcss_alignment_path`(x, y[, window, epsilon, ...]) Compute the LCSS alignment path between two time series.

## Edit Real Penalty (ERP)#

 `erp_distance`(x, y[, window, g, g_arr, ...]) Compute the ERP distance between two time series. `erp_pairwise_distance`(X[, y, window, g, ...]) Compute the ERP pairwise distance between a set of time series. `erp_cost_matrix`(x, y[, window, g, g_arr, ...]) Compute the ERP cost matrix between two time series. `erp_alignment_path`(x, y[, window, g, g_arr, ...]) Compute the ERP alignment path between two time series.

## Edit distance for real sequences (EDR)#

 `edr_distance`(x, y[, window, epsilon, ...]) Compute the EDR distance between two time series. `edr_pairwise_distance`(X[, y, window, ...]) Compute the pairwise EDR distance between a set of time series. `edr_cost_matrix`(x, y[, window, epsilon, ...]) Compute the EDR cost matrix between two time series. `edr_alignment_path`(x, y[, window, epsilon, ...]) Compute the EDR alignment path between two time series.

## General methods with distance argument#

 `distance`(x, y, metric, **kwargs) Compute the distance between two time series. `pairwise_distance`(x[, y, metric]) Compute the pairwise distance matrix between two time series. `cost_matrix`(x, y, metric, **kwargs) Compute the alignment path and distance between two time series. `alignment_path`(x, y, metric, **kwargs) Compute the alignment path and distance between two time series.

## General methods to recover distance functions#

 `get_distance_function`(metric) Get the distance function for a given metric string or callable. Get the pairwise distance function for a given metric string or callable. Get the cost matrix function for a given metric string or callable. Get the alignment path function for a given metric string or callable.