[ENH] Parameterise the dtw
and adtw
distances
#1874
Labels
distances
Distances package
enhancement
New feature, improvement request or other non-bug code enhancement
Describe the feature or idea you want to propose
Recent advances in similarity-based classification, like the Proximity Forest 2.0 include parameterising cost functions used in similarity measures. However, the current aeon implementation of
dtw
uses squared distance as the cost function. The Minkowski distance is a generalised form of both the Euclidean and Manhattan distance, and hence can be used as the cost function fordtw
andadtw
.Describe your proposed solution
Use Minkowski distance instead of
squared_univariate_distance
to compute thedtw
cost matrix.distance = np.sum((np.abs(x - y) ** p)) ** (1.0 / p)
Describe alternatives you've considered, if relevant
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: