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

Amerced Dynamic Time Warping (ADTW)

adtw_distance(x, y[, window, ...])

Compute the ADTW distance between two time series.

adtw_pairwise_distance(X[, y, window, ...])

Compute the ADTW pairwise distance between a set of time series.

adtw_cost_matrix(x, y[, window, ...])

Compute the ADTW cost matrix between two time series.

adtw_alignment_path(x, y[, window, ...])

Compute the ADTW 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.

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.

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.

Euclidean

euclidean_distance(x, y)

Compute the Euclidean distance between two time series.

euclidean_pairwise_distance(X[, y])

Compute the Euclidean pairwise distance between a set of 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.

Manhattan

manhattan_distance(x, y)

Compute the manhattan distance between two time series.

manhattan_pairwise_distance(X[, y])

Compute the manhattan pairwise distance between a set of time series.

Minkowski

minkowski_distance(x, y[, p, w])

Compute the Minkowski distance between two time series.

minkowski_pairwise_distance(X[, y, p, w])

Compute the Minkowski pairwise distance between a set of 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.

Shape-based Distance (SBD)

sbd_distance(x, y[, standardize])

Compute the shape-based distance (SBD) between two time series.

sbd_pairwise_distance(X[, y, standardize])

Compute the shape-based distance (SBD) between all pairs of time series.

Shape Dynamic Time Warping (Shape DTW)

shape_dtw_distance(x, y[, window, ...])

Compute the ShapeDTW distance function between two series x and y.

shape_dtw_pairwise_distance(X[, y, window, ...])

Compute the ShapeDTW pairwise distance among a set of series.

shape_dtw_cost_matrix(x, y[, window, ...])

Compute the ShapeDTW cost matrix between two series x and y.

shape_dtw_alignment_path(x, y[, window, ...])

Compute the ShapeDTW alignment path between two series x and y.

Squared

squared_distance(x, y)

Compute the squared distance between two time series.

squared_pairwise_distance(X[, y])

Compute the squared pairwise distance between a set of 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 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.

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.

General methods with distance argument

distance(x, y, method, **kwargs)

Compute the distance between two time series.

pairwise_distance(x[, y, method, symmetric])

Compute the pairwise distance matrix between two time series.

cost_matrix(x, y[, method])

Compute the alignment path and distance between two time series.

alignment_path(x, y[, method])

Compute the alignment path and distance between two time series.

create_bounding_matrix(x_size, y_size[, ...])

Create a bounding matrix for an elastic distance.

General methods to recover distance functions

get_distance_function(method)

Get the distance function for a given distance string or callable.

get_pairwise_distance_function(method)

Get the pairwise distance function for a given method string or callable.

get_distance_function_names()

Get a list of distance function names in aeon.

get_cost_matrix_function(method)

Get the cost matrix function for a given distance string or callable.

get_alignment_path_function(method)

Get the alignment path function for a given method string or callable.