sktime/sktime

[ENH] sliding window (z or quantile) score based anomaly detection

Open

#6,811 opened on Jul 22, 2024

View on GitHub
 (7 comments) (1 reaction) (0 assignees)Python (1,192 forks)batch import
enhancementgood first issuemodule:detection

Repository metrics

Stars
 (7,162 stars)
PR merge metrics
 (Avg merge 26d 10h) (86 merged PRs in 30d)

Description

Two algorithms that we could implement for starter in the sliding windo detection family:

  • sliding window with parameters related to window (like in pandas). Get quantile or z score based on last window, and threshold the score.
  • fit-update-predict on expanding or rolling window splitter with an arbitrary forecaster. Get forecasts, and threshold residuals. Or get proba forecasts, and compute quantile score based on those.

The first is a special case of the second, where we make a naive distributional forecast, but I think it's worth having the first separately implemented for two reasons:

  • it is a common subcase, and not obvious how to obtain it as a special case of the second
  • we explore implementation issues that arise from using sliding windows etc

Contributor guide