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] New detector base class #11

Merged
merged 75 commits into from
Aug 23, 2024
Merged

[ENH] New detector base class #11

merged 75 commits into from
Aug 23, 2024

Conversation

Tveten
Copy link
Collaborator

@Tveten Tveten commented Aug 22, 2024

  • Update dependencies:

    • sktime >= 0.30. The sktime update is an API break to BaseSeriesAnnotator, which among other things removes the fmt and labels arguments. Since BaseSeriesAnnotator is still experimental, this PR refactors a lot of basic functionality.
    • No upper restriction on numpy and pandas.
  • Introduce BaseDetector, which inherits from BaseTransformer in sktime. See here sktime time series anomalies/changepoint interface upgrade, moving skchange to 2nd or 1st party? #8 for reasoning. This class is an alternative to BaseSeriesAnnotator as long as it is experimental, but aims to not stray too far away. It also removes the fmt and labels arguments.

  • Add base classes per detection type:

    • ChangeDetector
    • PointAnomalyDetector
    • CollectiveAnomalyDetector
    • SubsetCollectiveAnomalyDetector
  • Refactor all change and anomaly detectors to depend on a suitable subclass of BaseDetector.

  • Convert from black to ruff for formatting.

Tveten added 30 commits August 19, 2024 16:14
Separates functionality regarding different detectors more clearly. Less clutter in BaseDetector.
Can be reused when implementing _predict in subclasses
Checks for sktime compatibility with estimators, not subclasses.
To pass sktime check_estimator tests. It requires inheritance from an sktime.BaseEstimator subclass. Could be a good idea, since it passes as a transformer immediately.
Mainly to pass sktime conformance tests, which requires inheritance of a subclass of BaseEstimator. But aso useful to be a fully functional transformer.
Exists in test_detectors.py
None of the functions are in use anymore.
@Tveten Tveten merged commit 6cd6796 into main Aug 23, 2024
6 checks passed
@Tveten Tveten deleted the new_detector_base_class branch September 3, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant