aif360.sklearn.metrics.generalized_fpr

aif360.sklearn.metrics.generalized_fpr(y_true, probas_pred, *, pos_label=1, sample_weight=None, zero_division='warn')[source]

Return the ratio of generalized false positives to negative examples in the dataset, \(GFPR = \tfrac{GFP}{N}\).

Generalized confusion matrix measures such as this are calculated by summing the probabilities of the positive class instead of the hard predictions.

Parameters:
  • y_true (array-like) – Ground-truth (correct) target values.

  • probas_pred (array-like) – Probability estimates of the positive class.

  • pos_label (scalar, optional) – The label of the positive class.

  • sample_weight (array-like, optional) – Sample weights.

  • zero_division ('warn', 0 or 1) – Sets the value to return when there is a zero division. If set to “warn”, this acts as 0, but warnings are also raised.

Returns:

float – Generalized false positive rate.