aif360.sklearn.metrics.generalized_fnr

aif360.sklearn.metrics.generalized_fnr(y_true, probas_pred, pos_label=1, sample_weight=None)[source]

Return the ratio of generalized false negatives to positive examples in the dataset, \(GFNR = \tfrac{GFN}{P}\).

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.
Returns:

float – Generalized false negative rate. If there are no positive samples in y_true, this will raise an UndefinedMetricWarning and return 0.