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] Added useful class attributes to SAST based transforms #2006

Merged
merged 16 commits into from
Oct 31, 2024

Conversation

IRKnyazev
Copy link
Contributor

Reference Issues/PRs

Fixes #2004

What does this implement/fix? Explain your changes.

Added class attributes found in ST that are helpful for interpreting shapelets. They do not serve functionality for the classifier but improve explainability.

Implemented:
The class each subseries is from,
the index of the original series the subseries is extracted from,
the start pos of the subseries in the original series.

@aeon-actions-bot aeon-actions-bot bot added classification Classification package enhancement New feature, improvement request or other non-bug code enhancement transformations Transformations package labels Aug 23, 2024
@aeon-actions-bot
Copy link
Contributor

aeon-actions-bot bot commented Aug 23, 2024

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ $\color{#FEF1BE}{\textsf{enhancement}}$ ].
I have added the following labels to this PR based on the changes made: [ $\color{#BCAE15}{\textsf{classification}}$, $\color{#41A8F6}{\textsf{transformations}}$ ]. Feel free to change these if they do not properly represent the PR.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, any trivial fixes will automatically be pushed to your PR unless it is a draft.

Don't hesitate to ask questions on the aeon Slack channel if you have any.

PR CI actions

These checkboxes will add labels to enable/disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Stop automatic pre-commit fixes (always disabled for drafts)
  • Push an empty commit to re-run CI checks

@IRKnyazev IRKnyazev changed the title [ENH] Added useful class attributes to SAS based transforms [ENH] Added useful class attributes to SAST based transforms Sep 2, 2024
@baraline
Copy link
Member

baraline commented Sep 9, 2024

Hi Ivan, while memory wise the storage of these parameters would likely not cause too much trouble, I feel like this kind of optional storage should be gated behind a boolean given during initialization (something like store_shapelet_intialization_info ?).

I don't know if that's the goal of the PR (if not ignore it), but preferably, all the different shapelets methods should have the same name for these arguments, so we can use a common interface while inspecting them.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@IRKnyazev
Copy link
Contributor Author

IRKnyazev commented Sep 10, 2024

Hi Ivan, while memory wise the storage of these parameters would likely not cause too much trouble, I feel like this kind of optional storage should be gated behind a boolean given during initialization (something like store_shapelet_intialization_info ?).

I don't think having these extra private variables will cause confusion for users, I think it is more straight forward having them there for accessibility rather than providing the option for storing them. More than happy to implement your idea though if you disagree. Maybe @MatthewMiddlehurst might have a preference?

I don't know if that's the goal of the PR (if not ignore it), but preferably, all the different shapelets methods should have the same name for these arguments, so we can use a common interface while inspecting them.

Great point, I modified the start point variable name to be consistent with the other transforms!

@IRKnyazev IRKnyazev marked this pull request as draft September 10, 2024 09:31
@IRKnyazev IRKnyazev requested a review from baraline September 11, 2024 07:07
@IRKnyazev IRKnyazev mentioned this pull request Sep 11, 2024
2 tasks
Copy link
Member

@MatthewMiddlehurst MatthewMiddlehurst left a comment

Choose a reason for hiding this comment

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

Given it's private I don't think theres a harm in adding it assuming the memory footprint is not large.

I agree we should eventually unify this between the approaches if possible. Not sure how they all do it differently, I think STC is a list of lists for each shapelet.

Happy to remove the function if it is mostly duplicated by the new visualisation tools.

@TonyBagnall TonyBagnall marked this pull request as ready for review October 31, 2024 08:52
@aeon-actions-bot aeon-actions-bot bot added the full examples run Run all examples on a PR label Oct 31, 2024
@aeon-actions-bot aeon-actions-bot bot removed the full examples run Run all examples on a PR label Oct 31, 2024
@TonyBagnall TonyBagnall merged commit 340d9e1 into aeon-toolkit:main Oct 31, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
classification Classification package enhancement New feature, improvement request or other non-bug code enhancement transformations Transformations package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH] Shapelet transforms vary in class attributes
4 participants