Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Distance module cleanup #372

Merged
merged 186 commits into from
May 6, 2023
Merged

[ENH] Distance module cleanup #372

merged 186 commits into from
May 6, 2023

Conversation

chrisholder
Copy link
Contributor

Reference Issues/PRs

This pr depends on pr #369

What does this implement/fix? Explain your changes.

This is the final major pr for the distance module which cleans up the legacy code that had to be there while the distances were transitioning to their new format. This pr add back the utility functions for the distance module.

Furthermore, this pr removes the 3d array support for distance, cost matrix, and alignment path as this was producing incorrect results and was likely an undesirable feature to begin win.

Does your contribution introduce a new dependency? If yes, which one?

What should a reviewer concentrate their feedback on?

Did you add any tests for the change?

New tests for the utility functions have been added and tests for 3d numpy have been removed for distances, cost matrix and alignment paths.

Any other comments?

PR checklist

For all contributions
  • I've added myself to the list of contributors.
  • Optionally, I've updated aeon's CODEOWNERS to receive notifications about future changes to these files.
  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG] indicating whether the PR topic is related to enhancement, maintenance, documentation, or bug.
  • For new estimators, I've added the estimator to the online documentation.

@chrisholder chrisholder changed the title [ENH] Distance cleanup [ENH] Distance module cleanup May 3, 2023
@chrisholder chrisholder added enhancement New feature, improvement request or other non-bug code enhancement distances Distances package labels May 3, 2023
TonyBagnall
TonyBagnall previously approved these changes May 5, 2023
Copy link
Contributor

@TonyBagnall TonyBagnall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

taking this somewhat on faith, but bits I looked at looked good, seem to have condensed the code quite a lot

Copy link
Contributor

@TonyBagnall TonyBagnall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last one, great effort

@TonyBagnall TonyBagnall merged commit 57dcd08 into main May 6, 2023
@TonyBagnall TonyBagnall deleted the distance-cleanup branch May 6, 2023 10:56
MatthewMiddlehurst added a commit to time-series-machine-learning/aeon-tsml-fork that referenced this pull request May 6, 2023
* [ENH] Distance module cleanup (aeon-toolkit#372)

* refactored distances to use new bounding

* refactored distances to use new bounding

* precommit fixes

* added setup back

* fixed tests

* begun adding new euclid and squared

* updated notebook

* fixed test

* fixed examples

* fixed examples

* Revert "fixed tests"

This reverts commit 2d69ca4.

* added new tests

* added ability to disabled numba when using generated_jit

* precommit fixes

* undo setup

* fixed typo

* added new distances to util funcs

* precommit fixes

* fixed clustering tests

* precommit fixes

* removed generated_jit as it was adding 200ms to every call

* begun refactor

* begun refactor

* fixed bug in twe alignment path

* merge fixes

* fixed lcss and merge bounding matrix fixes

* precommit fixes

* precommit fixes

* changed name of alginment path file

* started writing dtw

* updated other dtw functions!

* wrote tests

* merged main and cleaned up docs. Added unequal length tests

* fixed setup.cfg

* updated docs

* updated docs

* added new tests for cost matrix and alignment paths

* disabled numba checks so can run without numba to ensure results are correct

* precommit fixes

* begun refactor

* fixed typo in dtw cost matrix

* added pairwise

* added raises to docs

* started fixing tests

* fixed EE tests

* fixed tests for ddtw

* fixed tests in clustering

* precommit fixes

* fixed reshape issue

* merge fixes and updated reshape

* updated reshape and docs

* updated docstring

* updated authors

* started refactor

* started refactor

* fixed issue where parameters not being passed

* fixed issue where parameters not being passed

* refactored wdtw

* fixed tests

* fixed example

* begun refactor

* fixed tests

* removed redundent expected value

* updated parameter check

* updated parameter check

* started refactor

* fixed example

* continue with refactor

* added fastmath flag

* all tests passing

* added fastmath flag

* removed fastmath because it cases errors in lcss

* precommit fixes

* added erp

* added erp

* change g parameter to accept array

* updated lcss example

* fixed example

* fixed example

* started refactor

* updated pairwise to support multiple to multiple and single to multiple

* precommit fixes

* uncomment test setup

* added exampels

* remove redundent code

* remove redundent code

* refactored pairwise distance

* refactored pairwise distance

* refactored pairwise distance

* updated examples

* refactored pairwise distance

* refactored pairwise distance

* recomment setup

* precommit

* updated examples

* updated examples

* added fast math

* refactored pairwise distance

* continue refactor

* updated examples

* update example

* continue refactor

* remove example distance values

* updated examples

* fixed examples

* fixed examples

* fixed alignment path and examples

* uncomment setup

* precommit

* updated pairwise and tests

* setup

* refactored edr distance

* setup

* refactored twe distance

* refactored msm distance

* removed base class and old tests

* begun clean up

* fixed broken tests by adding custom pairwise function passed

* refactored distance, cost matrix and alignment path to only support 1d and 2d

* added new tests for new functionality of utility functions

* precommit

* setup

* fixed incorrect tests in classification

* cleanedup multiple to multiple calls

* added comment and removed unused function

* setup

* precommit

* fork auto sync

* fork auto sync

* try force pushing

---------

Co-authored-by: chrisholder <chrisholder987@hotmail.com>
TonyBagnall pushed a commit that referenced this pull request Sep 1, 2023
* fork auto sync

* fork auto sync

* fork auto sync

* fork auto sync (#4)

* fork auto sync

* try force pushing

* Fork auto sync (#5)

* [ENH] Distance module cleanup (#372)

* refactored distances to use new bounding

* refactored distances to use new bounding

* precommit fixes

* added setup back

* fixed tests

* begun adding new euclid and squared

* updated notebook

* fixed test

* fixed examples

* fixed examples

* Revert "fixed tests"

This reverts commit 2d69ca4.

* added new tests

* added ability to disabled numba when using generated_jit

* precommit fixes

* undo setup

* fixed typo

* added new distances to util funcs

* precommit fixes

* fixed clustering tests

* precommit fixes

* removed generated_jit as it was adding 200ms to every call

* begun refactor

* begun refactor

* fixed bug in twe alignment path

* merge fixes

* fixed lcss and merge bounding matrix fixes

* precommit fixes

* precommit fixes

* changed name of alginment path file

* started writing dtw

* updated other dtw functions!

* wrote tests

* merged main and cleaned up docs. Added unequal length tests

* fixed setup.cfg

* updated docs

* updated docs

* added new tests for cost matrix and alignment paths

* disabled numba checks so can run without numba to ensure results are correct

* precommit fixes

* begun refactor

* fixed typo in dtw cost matrix

* added pairwise

* added raises to docs

* started fixing tests

* fixed EE tests

* fixed tests for ddtw

* fixed tests in clustering

* precommit fixes

* fixed reshape issue

* merge fixes and updated reshape

* updated reshape and docs

* updated docstring

* updated authors

* started refactor

* started refactor

* fixed issue where parameters not being passed

* fixed issue where parameters not being passed

* refactored wdtw

* fixed tests

* fixed example

* begun refactor

* fixed tests

* removed redundent expected value

* updated parameter check

* updated parameter check

* started refactor

* fixed example

* continue with refactor

* added fastmath flag

* all tests passing

* added fastmath flag

* removed fastmath because it cases errors in lcss

* precommit fixes

* added erp

* added erp

* change g parameter to accept array

* updated lcss example

* fixed example

* fixed example

* started refactor

* updated pairwise to support multiple to multiple and single to multiple

* precommit fixes

* uncomment test setup

* added exampels

* remove redundent code

* remove redundent code

* refactored pairwise distance

* refactored pairwise distance

* refactored pairwise distance

* updated examples

* refactored pairwise distance

* refactored pairwise distance

* recomment setup

* precommit

* updated examples

* updated examples

* added fast math

* refactored pairwise distance

* continue refactor

* updated examples

* update example

* continue refactor

* remove example distance values

* updated examples

* fixed examples

* fixed examples

* fixed alignment path and examples

* uncomment setup

* precommit

* updated pairwise and tests

* setup

* refactored edr distance

* setup

* refactored twe distance

* refactored msm distance

* removed base class and old tests

* begun clean up

* fixed broken tests by adding custom pairwise function passed

* refactored distance, cost matrix and alignment path to only support 1d and 2d

* added new tests for new functionality of utility functions

* precommit

* setup

* fixed incorrect tests in classification

* cleanedup multiple to multiple calls

* added comment and removed unused function

* setup

* precommit

* fork auto sync

* fork auto sync

* try force pushing

---------

Co-authored-by: chrisholder <chrisholder987@hotmail.com>

* force push with lease

* push workflow

* glossary

* last ones

* fixes

* period

* Delete auto_sync.yml

---------

Co-authored-by: chrisholder <chrisholder987@hotmail.com>
Co-authored-by: MatthewMiddlehurst <MatthewMiddlehurst@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distances Distances package enhancement New feature, improvement request or other non-bug code enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants