Fault diagnosis metrics#

ice.fault_diagnosis.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.fault_diagnosis.metrics.correct_daignosis_rate(pred: ndarray, target: ndarray) float[source]#

Correct Diagnosis Rate is the total number of correctly diagnosed faulty samples divided by the number of detected faulty samples.

Parameters:
  • pred (np.ndarray) – predictions.

  • target (np.ndarray) – target values.

Returns:

value of Correct Diagnosis Rate.

Return type:

float

ice.fault_diagnosis.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.fault_diagnosis.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