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 attributes to extracted shapelets for RDST #1959

Merged
merged 14 commits into from
Aug 13, 2024

Conversation

IRKnyazev
Copy link
Contributor

@IRKnyazev IRKnyazev commented Aug 13, 2024

Reference Issues/PRs

Fixes #1950

What does this implement/fix? Explain your changes.

Added a list of starting points & class values for the transformer's extracted shapelets.

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

No.

Any other comments?

I'm pretty sure this introduction doesn't harm any functionality across the module. I searched for all uses of RDST and checked for calls to RDSTClassifier.transformer.shapelets

@IRKnyazev IRKnyazev requested a review from aiwalter as a code owner August 13, 2024 03:49
@aeon-actions-bot aeon-actions-bot bot added enhancement New feature, improvement request or other non-bug code enhancement transformations Transformations package labels Aug 13, 2024
@aeon-actions-bot
Copy link
Contributor

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{#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 requested a review from baraline as a code owner August 13, 2024 04:25
baraline
baraline previously approved these changes Aug 13, 2024
Copy link
Member

@baraline baraline left a comment

Choose a reason for hiding this comment

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

LGTM thanks ! Would be nice to have start index for all shapelets to visualize the generation process at some point

@IRKnyazev
Copy link
Contributor Author

I can't seem to figure out how the error relates to the code I have added

@Moonzyyy
Copy link
Contributor

I dmed you about the issue, someone else had it previously and it seems its just a random chance to pass it or not. Worth raising it as an issue. Haven't looked at the algorithm myself yet but id assume it most likely needs to have set a seed.

@baraline
Copy link
Member

baraline commented Aug 13, 2024

Just noting that there will be an impact on #1949 when this goes though, is it ready for review now ?

@IRKnyazev IRKnyazev changed the title [ENH] Added the starting position of extracted shapelets for RDST [ENH] Added useful attributes to extracted shapelets for RDST Aug 13, 2024
@IRKnyazev
Copy link
Contributor Author

Just noting that there will be an impact on #1949 when this goes though, is it ready for review now ?

yes please!

Copy link
Member

@baraline baraline left a comment

Choose a reason for hiding this comment

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

I'm fine with the addition of classes, although it might not be obvious to use. For example, consider a shapelet extracted from class 0. It might be more discriminative toward class 2 due to the absence of a common pattern present in class 0 and 1 for example.
But this is not the concern of this PR, the storing of these attributes also not likely to take much space, so LGTM !

@baraline baraline merged commit ffd1567 into aeon-toolkit:main Aug 13, 2024
14 checks passed
@IRKnyazev
Copy link
Contributor Author

I'm fine with the addition of classes, although it might not be obvious to use. For example, consider a shapelet extracted from class 0. It might be more discriminative toward class 2 due to the absence of a common pattern present in class 0 and 1 for example.

Yes I totally agree, that's exactly what made me want to use it in my notebook haha, being able to visualise shapelets and their source class should improve explainability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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] Can't plot Random Dilated Shapelets on their extracted time point positions.
3 participants