-
Notifications
You must be signed in to change notification settings - Fork 171
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] Implementation of LOF using PyODAdapter #2209
Conversation
Thank you for contributing to
|
@CodeLionX some tests ran with no |
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.
Thanks for your contribution! The window_size
and stride
parameters should have a proper default that should get picked up during the tests. I cannot explain why this is not happening in your tests.
This already looks good. However, LOF is special because of its different calling conventions for unsupervised (outlier detection) and semi-supervised (novelty detection) problems. Please refer to my comment below on how to best integrate this into our API.
The tests in their current version are not very helpful. They mostly test the functionality of the PyODAdapter
. Similar to the tests in COPOD (#2202 (comment)), I would like to test that the integration into aeon works as expected. We should also test that the metric
-parameter works for our distance implementations and that the different calling conventions (unsupervised and semi-supervised) work correctly.
Co-authored-by: Sebastian Schmidl <[email protected]>
@CodeLionX The output values from aeon_lof and pyod_lof don't match. I've tried normalizing the series but the error persists.
|
Co-authored-by: Sebastian Schmidl <[email protected]>
@CodeLionX Hey! I am unable to resolve these conflicts. I have tried everything, but I am stuck. Please tell me how to proceed from here. |
Hey, I cannot write directly to your branch, but resolving this should not be that difficult. Don't you use pre-commit locally? It looks like you can push changes that do not follow our coding standards, and the changes by our pipeline are creating the issues for you. Please enable pre-commit in your dev box ( Once, you have this set up, make the following changes: --- a/aeon/anomaly_detection/__init__.py
+++ b/aeon/anomaly_detection/__init__.py
@@ -1,14 +1,15 @@
"""Time Series Anomaly Detection."""
__all__ = [
- "LOF" "DWT_MLEAD",
+ "DWT_MLEAD",
+ "IsolationForest",
"KMeansAD",
+ "LeftSTAMPi",
+ "LOF",
"MERLIN",
- "STRAY",
"PyODAdapter",
"STOMP",
- "LeftSTAMPi",
- "IsolationForest",
+ "STRAY",
] --- a/aeon/anomaly_detection/tests/test_lof.py
+++ b/aeon/anomaly_detection/tests/test_lof.py
@@ -235,8 +235,8 @@ def test_lof_semi_supervised():
# Ensure shapes and types
assert scores_aeon.shape == (20,)
assert scores_pyod.shape == (20,)
- assert scores_aeon.dtype == np.float_
- assert scores_pyod.dtype == np.float_
+ assert scores_aeon.dtype == np.float64
+ assert scores_pyod.dtype == np.float64 Commit, and push again. |
Co-authored-by: Sebastian Schmidl <[email protected]>
Co-authored-by: Sebastian Schmidl <[email protected]>
Co-authored-by: Sebastian Schmidl <[email protected]>
Co-authored-by: Sebastian Schmidl <[email protected]>
Seems to be a conflict here. Not sure if the unresolved conflict needs any action or not. |
Fixed. Were just some duplicated entries in |
Reference Issues/PRs
Fixes #2109
What does this implement/fix? Explain your changes.
Implemented Local Outlier Factor using PyODadapter
PR checklist
For all contributions