fairlearn.metrics.false_positive_rate#
- fairlearn.metrics.false_positive_rate(y_true, y_pred, sample_weight=None, pos_label=None)[source]#
Calculate the false positive rate (also called fall-out).
Read more in the User Guide.
Added in version 0.4.6.
- Parameters:
y_true (array_like) – The list of true values
y_pred (array_like) – The list of predicted values
sample_weight (array_like, optional) – A list of weights to apply to each sample. By default all samples are weighted equally
pos_label (scalar, optional) – The value to treat as the ‘positive’ label in the samples. If
None(the default), the labels must be drawn from{0, 1}or{-1, 1}, and1is used as the positive label. For other binary labels, specifypos_labelexplicitly.
- Return type:
- Returns:
The false positive rate for the data