Hyperactive icon indicating copy to clipboard operation
Hyperactive copied to clipboard

[ENH] `sktime` detectors integration

Open fkiraly opened this issue 3 months ago • 5 comments

It would be nice to have an estimator level integration with detectors in the sktime package. https://github.com/sktime/sktime

This would require:

  • a BaseExperiment descendant class SktimeDetectorExperiment which carries out a cross-validation experiment for time series detectors. This can lean on SktimeClassificationExperiment, in particular when handling metrics. In hyperactive.experiment.integrations. Also see the extension template https://github.com/SimonBlanke/Hyperactive/blob/main/extension_templates/experiments.py
  • a TSDetectorOptCv class inheriting from sktime BaseDetector similar to the other classes in hyperactive.integrations. Internally, it uses the SktimeDetectorExperiment

fkiraly avatar Sep 22 '25 19:09 fkiraly

Hello, will love to contribute to this issue. Is it open to non-maintainers?

Also, do you have an example of possible application where this could be applied?

smilingprogrammer avatar Nov 15 '25 04:11 smilingprogrammer

Yes, this is open!

As an example, one would optimize a detector to "numbers of detections per month" being close to a pre-scribed value.

fkiraly avatar Nov 16 '25 20:11 fkiraly

Thank you, will look into it then.

smilingprogrammer avatar Nov 17 '25 03:11 smilingprogrammer

Hello, quick question @fkiraly

Is there a similar function like from sktime.classification.model_evaluation import evaluate as we have in SktimeClassificationExperiment _evaluate() function, but for detectors?. I looked into the documentation, and here in the sktime codebase https://github.com/sktime/sktime/tree/4aab650ca9ab09d76b2b56e0c26b6a26d8a0c640/sktime/detection, but didn't find any.

Is there any alternative to this?

smilingprogrammer avatar Nov 18 '25 08:11 smilingprogrammer

as discussed in the PR, repeating here for completeness - not yet, and thanks for implementing it in https://github.com/sktime/sktime/pull/9074!

fkiraly avatar Nov 28 '25 00:11 fkiraly