StreamAD Process#

Post process#

ZScoreThresholder#

class streamad.process.ZScoreThresholder(sigma=3, is_global=True, window_len=100)[source]#

Bases: object

__init__(sigma=3, is_global=True, window_len=100)[source]#

A thresholder which can filter out outliers using z-score, and normalize the anomaly scores into [0,1].

Parameters
  • sigma (int, optional) – Zscore threshold, we regard the scores out of sigma as anomalies. Defaults to 3.

  • is_global (bool, optional) – Method to record, a global way or a rolling window way. Defaults to True.

  • window_len (int, optional) – The length of rolling window, ignore this when is_global=True. Defaults to 100.


TDigestThresholder#

class streamad.process.TDigestThresholder(percentile_up=95, percentile_down=5, is_global=True, window_len=100)[source]#

Bases: object

__init__(percentile_up=95, percentile_down=5, is_global=True, window_len=100)[source]#

A thresholder which can filter out outliers using t-digest, and normalize the anomaly scores into [0,1] [Dunning, 2021].

Parameters
  • percentile_up (float, optional) – We regard the scores above percentile_up as anomalies. Defaults to 95.

  • percentile_down (float, optional) – We regard the scores below percentile_down as anomalies. Defaults to 5.

  • is_global (bool, optional) – Method to record, a global way or a rolling window way. Defaults to True.

  • window_len (int, optional) – The length of rolling window, ignore this when is_global=True. Defaults to 100.