Quantile#

class oats.threshold.quantile.QuantileThreshold(*args, **kwargs)[source]#

Bases: Threshold

Simple threshold method where top q deciles of anomaly scores are labeled as anomalies. Beware that user is guaranteed to have outlier predictions with this method!

fit() not necessary.

fit(*args, **kwargs)[source]#
get_threshold(data, percentile: float = 0.95)[source]#
Parameters:
  • data (np.ndarray) – array of anomaly scores

  • percentile (float, optional) – decile level used for threshold. Defaults to 0.95.

Returns:

array of thresholds

Return type:

np.ndarray