Evaluation module
This module contains functionality to evaluate performance of an anomaly detector. It can be imported as follows:
>>> from dtaianomaly import evaluation
Custom evaluation metrics can be implemented by extending BinaryMetric or
ProbaMetric. The former expects predicted “decisions” (anomaly or not),
the latter predicted “scores” (more or less anomalous). This distinction is important for later use in
a Worfklow.
Base Objects
|
Base class for metrics. |
A metric that takes as input binary anomaly labels. |
|
Base class for probabilistic metrics. |
|
|
Base class for F-Beta metrics. |
Affiliation-based
Compute the affiliation-based precision score [17]. |
|
Compute the affiliation-based recall score [17]. |
|
|
Compute the affiliation-based \(F_\beta\) score [17]. |
Area Under the Curve (AUC)
Computes the Area Under the Precision-Recall Curve (AUC-PR) score. |
|
Compute the Area Under the Receiver Operating Characteristic Curve (AUC-ROC) score. |
Classification-based
Compute the Precision score. |
|
|
Computes the Recall score. |
|
Computes the \(F_\beta\) score. |
Compound metrics
|
Apply a |
|
Compute the maximum score across all thresholds. |
Event-wise
Compute the Event-Wise Precision score [9]. |
|
Compute the Event-Wise Recall score [9]. |
|
|
Compute the Event-Wise \(F_\beta\) score [9]. |
Point-adjusted
Compute the point-adjusted precision. |
|
Compute the point-adjusted recall. |
|
|
Compute the point-adjusted \(F_\beta\). |
Range-based
|
Computes the range-based precision score [34]. |
|
Computes the range-based recall score [34]. |
|
Computes the range-based \(F_\beta\) score [34]. |
UCR Score
|
Compute the UCR-Score to evaluate the predicted anomaly scores [39]. |
Volume Under the Surface (VUS)
|
Computes the area under the range-based PR-curve [24]. |
|
Computes the area under the range-based ROC-curve [24]. |
|
Computes the volume under the range-based precision-recall-curve [24]. |
|
Computes the volume under the range-based ROC-curve [24]. |