Skip to content

[ENH] Parameterise the dtw and adtw distances #1874

Open
@itsdivya1309

Description

@itsdivya1309

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 for dtw and adtw.

Describe your proposed solution

Use Minkowski distance instead of squared_univariate_distance to compute the dtw 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    distancesDistances packageenhancementNew feature, improvement request or other non-bug code enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions