fatf.utils.metrics.metrics
.positive_predictive_value¶
-
fatf.utils.metrics.metrics.
positive_predictive_value
(confusion_matrix: numpy.ndarray) → float[source]¶ Calculates the positive predictive value for a binary confusion matrix.
See the documentation of
fatf.utils.metrics.tools.validate_confusion_matrix
andfatf.utils.metrics.tools.validate_confusion_matrix_size
for all the possible errors and exceptions.- Parameters
- confusion_matrixnumpy.ndarray
A confusion matrix based on which the metric will be computed.
- Returns
- metricnumber
The positive predictive value.