fairlearn.metrics.selection_rate#
- fairlearn.metrics.selection_rate(y_true, y_pred, *, pos_label=1, sample_weight=None)[source]#
- Calculate the fraction of predicted labels matching the ‘good’ outcome. - The argument pos_label specifies the ‘good’ outcome. For consistency with other metric functions, the - y_trueargument is required, but ignored.- Read more in the User Guide. - Parameters:
- y_true (array_like) – The true labels (ignored) 
- y_pred (array_like) – The predicted labels 
- pos_label (Scalar) – The label to treat as the ‘good’ outcome 
- sample_weight (array_like) – Optional array of sample weights 
 
- Return type: