Negative Predictive Value

Overview

The Negative Predictive Value (NPV) is a metric used to evaluate the performance of a classification model in terms of the proportion of negative predictions that are correct. It measures the model's ability to correctly identify negative instances.

Formula

NPV = P(actual = - | prediction = -) = TN /(TN + FN)

Source

Where:

  • TN (True Negatives): The number of negative instances correctly predicted by the model
  • FN (False Negatives): The number of positive instances incorrectly predicted as negative by the model

Usage

Manually

# Usage example
npv_priv, npv_unpriv = negative_predictive_value(df, protected_attribute, privileged_group, labels, positive_label, y_true)

print("Negative Predictive Value for privileged group:", npv_priv)
print("Negative Predictive Value for unprivileged group:", npv_unpriv)

Using Fairness Object

npv_priv,npv_unpriv = (fo.compute(negative_predictive_value))

Results

Negative Predictive Value for privileged group: 0.8333333333194445 
Negative Predictive Value for unprivileged group: 0.199999999996

These results are obtained by using the input data given in the Create Example Data page under Getting Started

Interpretation

A higher NPV value indicates that the model has a higher proportion of correct negative predictions, which is desirable. An NPV of 1.0 indicates that all negative predictions made by the model are correct.