langfair.metrics.classification.metrics.false_positive.FalsePositiveRateParity#

class langfair.metrics.classification.metrics.false_positive.FalsePositiveRateParity#

Bases: Metric

__init__()#

This class computes False Positive Rate Parity. The user may specify whether to compute this metric as a difference or a ratio.

Methods

__init__()

This class computes False Positive Rate Parity.

binary_confusion_matrix(y_true, y_pred)

evaluate(groups, y_pred, y_true[, ratio])

This method computes disparity in false positive rates between two groups.

evaluate(groups, y_pred, y_true, ratio=False)#

This method computes disparity in false positive rates between two groups.

Parameters:
  • groups (Array-like) – Group indicators. Must contain exactly two unique values.

  • y_pred (Array-like) – Binary model predictions. Positive and negative predictions must be 1 and 0, respectively.

  • y_true (Array-like, default=None) – Binary labels (ground truth values). Positive and negative labels must be 1 and 0, respectively.

  • ratio (bool, default=False) – Indicates whether to compute the metric as a difference or a ratio

Returns:

Value of false positive rate parity

Return type:

float