I have time series data where I use a sliding window to detect anomalies in those windows. A sliding window is an interval of the dataset that steps one datapoint for each iteration. Datapoints are seen multiple times in this way equal to the size of the window.

In short, the algorithm works like this:

  1. Choose window length: wl
  2. Learn normal data with sliding window
  3. Try to detect anomalies on test data with sliding window

I want to keep the sliding window method since it is necessary for the performance of the algorithm.

However, one anomaly occurs multiple times in the sliding window. When the anomaly appears in the sliding window for the first time it's on the 'right' side of the window.

How do we measure accuracy of anomaly detection in this case?

We could say that detecting the anomaly once in the window is enough or detect it wl times. What's best practice?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.