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

[BUG] Fix LearningShapeletClassifier non-standard methods #1387

Closed
MatthewMiddlehurst opened this issue Apr 8, 2024 · 8 comments · Fixed by #1687
Closed

[BUG] Fix LearningShapeletClassifier non-standard methods #1387

MatthewMiddlehurst opened this issue Apr 8, 2024 · 8 comments · Fixed by #1687
Labels
bug Something isn't working classification Classification package good first issue Good for newcomers

Comments

@MatthewMiddlehurst
Copy link
Member

MatthewMiddlehurst commented Apr 8, 2024

Describe the bug

The non-standard methods in LearningShapeletClassifier were breaking the CI, likely due to the naming of transform. These have been commented out for now.

They should be included again and some testing should be done to figure out if this is why it breaks.

Steps/Code to reproduce the bug

N/A

Expected results

These methods can be included without CI breakage.

Actual results

CI breaks.
i.e. https://github.com/aeon-toolkit/aeon/actions/runs/8560508379/job/23459706210

Versions

No response

@MatthewMiddlehurst MatthewMiddlehurst added bug Something isn't working good first issue Good for newcomers classification Classification package labels Apr 8, 2024
@nileenagp
Copy link
Contributor

Hello, Just to understand the issue here, I tried to run the test_all_classifiers.py using pytest after uncommenting "locate" and "transform" methods in LearningShapeletClassifier class. The test completed with 5 warnings and I do not see any errors raised for these methods. Can you please clarify if I am missing anything here?
image

image

@MatthewMiddlehurst
Copy link
Member Author

Not sure. We were having failures such as https://github.com/aeon-toolkit/aeon/actions/runs/8560508379/job/23459706210 before. I think some tests check for the presence of methods such as transform.

Dont really like having these methods in a classifier either way.

@TonyBagnall
Copy link
Contributor

TonyBagnall commented Jun 10, 2024

just looking at this issue. imo these two methods (transform and locate) should only be callable after fit, and should return stored data, or just not have them in classifier and wrap it as a transformer

@nileenagp
Copy link
Contributor

I am still looking at the code to understand the test data, scenarios and the flow. When I have more clarity, hopefully I will be able to come back on this issue.

@TonyBagnall
Copy link
Contributor

@nileenagp I would not put too much effort into understanding the test scenarios, we are reworking it to make it simpler. I think we can resolve this issue quite simply as described above, I'll have a go and see what you think

@nileenagp
Copy link
Contributor

@nileenagp I would not put too much effort into understanding the test scenarios, we are reworking it to make it simpler. I think we can resolve this issue quite simply as described above, I'll have a go and see what you think

Thank you for sharing the details. I checked the changes in the PR and understand what you explained here. By looking at the code and the LearningShapelets library, as per my understanding we should still return the shapelet transform vector in the get_transform method. Let me know if I got that wrong..

image

I ran the new test_ls.py that you have created with above change and logging, it looks to be returning the shapelet transform vector as expected.

image

@nileenagp
Copy link
Contributor

Just for my understanding, should we not have a PR to call the self.clf_.transform(self.trasformed_data_) to transform the shapelet, before closing the issue?

@baraline
Copy link
Member

baraline commented Jul 17, 2024

Hey @nileenagp, sorry I'm not sure that I understand your issue, do you mean that you think we should expose a transform method to get the output of the shapelet transform once we have learned shapelet during fit ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working classification Classification package good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants