# aif360.sklearn.metrics.generalized_fpr¶

aif360.sklearn.metrics.generalized_fpr(y_true, probas_pred, pos_label=1, sample_weight=None)[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. float – Generalized false positive rate. If there are no negative samples in y_true, this will raise an UndefinedMetricWarning and return 0.