-
Notifications
You must be signed in to change notification settings - Fork 87
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
[MNT] Update similarity search with new base classes : Query Search #1508
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Thank you for contributing to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments. All experimental so there some leeway, not going to say I went through every function with a fine tooth comb. Some of the comments may be a bit more general and apply to more than the highlighted code.
Would be good to update aeon-toolkit/aeon-admin#1 with the contents of your comments just so there a centralised document for interested people until we decide to make this non-experimental.
I would be careful with the base class parameters, if it does not apply to all (or the vast majority) of inheriting classes then it probably should not be here. Not saying that is the case, but there are some bases i.e. clustering with n_clusters
where we are going to run into issues later.
|
||
|
||
@njit(cache=True, fastmath=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike uncontrolled parallelization. AFAIK the only way to control this is to alter the numba num_threads global attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is kept, at the very least it should be noted in the docstring and we should change the test config to disable numba threading.
@final | ||
def predict( | ||
self, | ||
q, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why q
? We should stick to x
and y
where possible.
) | ||
|
||
|
||
class BaseInstance(BaseSimiliaritySearch): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Does it make sense to create a test class for this? I assumes it was abstract and each submodule would have its own base class
- I would continue with the "MockEstimator" format we current have in
testing
if possible.
@@ -0,0 +1 @@ | |||
"""Series search module.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty
from aeon.similarity_search.query_search import BaseQuerySearch | ||
|
||
|
||
class DummyQuerySearch(BaseQuerySearch): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to a different comment, but I would say the dummy estimators provide a "reasonable" baseline with a strategy (i.e. intentional random guessing or mean of the label), while mock estimators try to go through the interface as quick as possible even if the output is nonsense. May not apply here, but the top of the docstring gives that impression.
Reference Issues/PRs
Part of #1243
What does this implement/fix? Explain your changes.
As described in #1243, this is a first PR that implement base classes for query search task, and transfers the existing code under this new submodule.
Remaining TODOs:
Reported to another PR as this one is already big enough
PR checklist
For new estimators and functions
__maintainer__
at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.