aeon
aeon copied to clipboard
[ENH] Add PyODAdapter-implementation for IsolationForest
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 IsolationForest 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