fatf.utils.metrics.metrics.multiclass_true_positive_rate¶
- 
fatf.utils.metrics.metrics.multiclass_true_positive_rate(confusion_matrix: numpy.ndarray, label_index: int) → float[source]¶ Calculates the “true positive rate” for a multi-class confusion matrix.
See the documentation of
fatf.utils.metrics.tools.validate_confusion_matrixfor all the possible errors and exceptions.- Parameters
 - confusion_matrixnumpy.ndarray
 A confusion matrix based on which the metric will be computed.
- label_indexinteger
 The index of a label that should be treated as “positive”.
- Returns
 - metricnumber
 The “true positive rate”.