aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
882 stars 93 forks source link

[ENH] Code improvement in `ElasticEnsemble` classifier #1718

Open itsdivya1309 opened 6 days ago

itsdivya1309 commented 6 days ago

Describe the feature or idea you want to propose

When ddtw or wddtw distance measures are used, the derivative of X is calculated and then used with dtw or wdtw. This need not be done as ddtw and wddtw themselves calculate the derivatives of the time series. https://github.com/aeon-toolkit/aeon/blob/v0.9.0/aeon/classification/distance_based/_elastic_ensemble.py#L159

Describe your proposed solution

The data should not be transformed into derivatives and the ddtw and wddtw distances from the distance module should be used directly like the other distances.

Describe alternatives you've considered, if relevant

No response

Additional context

No response

TonyBagnall commented 2 days ago

its worth a look, but irrc this is intentional to avoid doing the difference operation multiple times especially when cross validating. I will take another look though