Thresholding module

Anomaly detectors typically predict continous anomaly scores: How anomalous is the observation? In many applications, a hard decision is required: Is the observation an anomaly? The continuous scores can be converted to discrete scores through thresholding. This module contains different methods to threshold the scores, and can be imported as follows:

>>> from dtaianomaly import thresholding

Custom thresholders can be implemented by extending the base dtaianomaly.thresholding.Thresholding class.

Base objects

Thresholding()

Base thresholding class.

Available Thresholds

FixedCutoffThreshold(cutoff)

Thresholding based on a fixed cut-off.

ContaminationRateThreshold(contamination_rate)

Thresholding based on a contamination rate.

TopNThreshold(n)

Thresholding based on a top N strategy.