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] Add PyODAdapter-implementation for COPOD #2111

Closed
SebastianSchmidl opened this issue Sep 27, 2024 · 1 comment · Fixed by #2202
Closed

[ENH] Add PyODAdapter-implementation for COPOD #2111

SebastianSchmidl opened this issue Sep 27, 2024 · 1 comment · Fixed by #2202
Assignees
Labels
anomaly detection Anomaly detection package enhancement New feature, improvement request or other non-bug code enhancement interfacing algorithms Interfacing existing algorithms/estimators for other packages

Comments

@SebastianSchmidl
Copy link
Member

Describe the feature or idea you want to propose

The PyODAdapter in aeon allows us to use any outlier detector from PyOD, which were originally proposed for relational data, also for time series anomaly detection (TSAD). Not all detectors are equally well suited for TSAD, however. We want to represent the frequently used and competitive outlier detection techniques within the anomaly_detection module of aeon directly.

Implement the COPOD method using the PyODAdapter.

Describe your proposed solution

  • Create a new file in aeon.anomaly_detection for the method
  • Create a new estimator class with PyODAdapter as the parent
  • Expose the algorithm's hyperparameters as constructor arguments, create the PyOD model and pass it to the super-constructor
  • Document your class
  • Add tests for certain edge cases if necessary

Example for IsolationForest:

class IsolationForest(PyODAdapter):
    """documentation ..."""
    def __init__(n_estimators: int = 100, max_samples: int | str = "auto", ..., window_size: int, stride: int):
        model = IForest(n_estimators, max_samples, ...
        super().__init__(model, window_size, stride)

    @classmethod
    def get_test_params(cls, parameter_set="default"):
        """..."""
        return {"n_estimators": 10, ...}

Describe alternatives you've considered, if relevant

No response

Additional context

No response

@SebastianSchmidl SebastianSchmidl added enhancement New feature, improvement request or other non-bug code enhancement good first issue Good for newcomers interfacing algorithms Interfacing existing algorithms/estimators for other packages anomaly detection Anomaly detection package labels Sep 27, 2024
@notaryanramani
Copy link
Contributor

Can you assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anomaly detection Anomaly detection package enhancement New feature, improvement request or other non-bug code enhancement interfacing algorithms Interfacing existing algorithms/estimators for other packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants