Anomaly detection metrics#
- ice.anomaly_detection.metrics.accuracy(pred: ndarray, target: ndarray) float [source]#
Accuracy of the classification is the number of true positives divided by the number of examples.
- Parameters:
pred (np.ndarray) – predictions.
target (np.ndarray) – target values.
- Returns:
accuracy.
- Return type:
float
- ice.anomaly_detection.metrics.false_positive_rate(pred: ndarray, target: ndarray) ndarray[float] [source]#
False Positive Rate, aka False Alarm Rate is the number of false alarms i divided by the number of normal samples.
- Parameters:
pred (np.ndarray) – predictions.
target (np.ndarray) – target values.
- Returns:
list of float values with true positive rate for each fault.
- Return type:
list
- ice.anomaly_detection.metrics.true_positive_rate(pred: ndarray, target: ndarray) ndarray[float] [source]#
True Positive Rate is the number of detected faults i divided by the number of faults i.
- Parameters:
pred (np.ndarray) – predictions.
target (np.ndarray) – target values.
- Returns:
list of float values with true positive rate for each fault.
- Return type:
list