fatf.utils.metrics.metrics.treatment

fatf.utils.metrics.metrics.treatment(confusion_matrix)[source]

Computes the “treatment” metric for a binary confusion matrix.

A “treatment” is the proportion of all the false positives to the sum of false positives and false negatives.

See the documentation of fatf.utils.metrics.tools.validate_confusion_matrix and fatf.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 “treatment” measurement.