True Negative Rate
Overview
AKA specificity. Calculates TN / (FP + TN)
for privileged and unprivileged groups. This is the probability that a negative prediction is truly negative.
Formula
TNR = TN / (FP + TN)
Where:
-
TN (True Negatives): The number of negative instances correctly predicted by the model
-
FP (False Positives): The number of positive instances incorrectly predicted as positive by the model
Usage
Manually
tnr_priv, tnr_unpriv = true_negative_rate(df, protected_attribute, privileged_group, labels, positive_label, y_true)
print("True Negative Rate for privileged group:", tnr_priv)
print("True Negative Rate for unprivileged group:", tnr_unpriv)
Using Fairness Object
tnr_priv, tnr_unpriv = (fo.compute(true_negative_rate))
Results
True Negative Rate for privileged group: 0.6249999999921875
True Negative Rate for unprivileged group: 0.24999999999375
These results are obtained by using the input data given in the Create Example Data page under Getting Started
Interpretation
A higher TNR indicates that the negatives are being correctly assigned as such.
Updated 8 months ago