Qualitative Metrics#

class oats.scorer.qualitative_metrics.QualitativeMetrics(window=10)[source]#

Bases: Scorer

Unsupervised qualitative metrics used to access the quality of the anomaly detection algorithm

Parameters:

window (int, optional) – Window sized used to compute diff_mean_trend and diff_mid_avg. Defaults to 10.

property avg_anom_dist_from_mean#

Distance of predicted anomalies to the mean of original data, should be high; useful for series with a lot of global point anomalies

property avg_cycles_delta_between_anom#

Average time between anomalies, should be high, as anomalies should be occuring far apart (for point anomalies)

property diff_mean_trend#

The trend (gradient) of predicted anomalies vs the trend of surrounding points, should be high

property diff_mid_avg#

The value of predicted anomalies vs the average of surrounding values, should be high

property max_range_non_anom#

The tightness of data from predicted non-anomalies, similar to the idea of avg_anom_dist_from_mean; should be low

property num_anom#

Number of predicted anomalies, should be low (as anomalies are rare)

property pct_anom#

Percentage of predicted anomalies, should be low (as anomalies are rare)

process(data, preds)[source]#