aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
989 stars 118 forks source link

[ENH] Add PyODAdapter-implementation for OC-SVM #2112

Open CodeLionX opened 3 weeks ago

CodeLionX commented 3 weeks ago

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 OC-SVM method using the PyODAdapter.

Describe your proposed solution


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

shreyamali01 commented 1 week ago

Hi, I'd like to work on this. Can you assign this issue to me?

CodeLionX commented 1 week ago

Sure thing, thanks for contributing!