Affiliation-based metrics
Implementations of the affiliation-based metrics proposed by [13]. These metrics will consider local affiliations around the ground truth anomalous events, and compute a distance within these affiliations to derive precision, recall and \(F_\\beta\)-score.
- class dtaianomaly.evaluation.AffiliationPrecision[source]
Computes the affiliation-based precision score [13].
The affiliation-metrics will first divide the time domain into a number of so-called affiliations: subsequences that are closest to the ground truth anomaly events. These affiliations do not have a fixed size. Then, the precision is computed within each affiliation as the distance from the predicted anomalous events to the ground truth event. The final precision then equals the average precision across all the affiliations.
- class dtaianomaly.evaluation.AffiliationRecall[source]
Computes the affiliation-based recall score [13].
The affiliation-metrics will first divide the time domain into a number of so-called affiliations: subsequences that are closest to the ground truth anomaly events. These affiliations do not have a fixed size. Then, the recall is computed within each affiliation as the distance from the ground truth anomalous event to the closest predicted anomalies in that affiliation. The final recall then equals the average recall across all the affiliations.
- class dtaianomaly.evaluation.AffiliationFBeta(beta: (<class 'float'>, <class 'int'>) = 1)[source]
Computes the affiliation-based \(F_\beta\) score [13].
The affiliation-metrics will first divide the time domain into a number of so-called affiliations: subsequences that are closest to the ground truth anomaly events. These affiliations do not have a fixed size. The precision is computed as the distance of the predicted anomalies to the ground truth event, and the recall is computed as the distance of the ground truth anomaly to the predicted anomalies. These precision and recall scores within each affiliation is then averaged. The \(F_\beta\) score is the harmonic mean of this average precision and recall.
- Parameters:
beta (int, float, default=1) – Desired beta parameter.
See also
AffiliationPrecisionCompute the affiliation-based Precision score.
AffiliationRecallCompute the affiliation-based Recall score.