aif360.sklearn.metrics
.selection_rate
- aif360.sklearn.metrics.selection_rate(y_true, y_pred, *, pos_label=1, sample_weight=None)[source]
Compute the selection rate, \(Pr(\hat{Y} = \text{pos_label}) = \frac{TP + FP}{P + N}\).
- Parameters:
y_true (array-like) – Ground truth (correct) target values. Ignored.
y_pred (array-like) – Estimated targets as returned by a classifier.
pos_label (scalar, optional) – The label of the positive class.
sample_weight (array-like, optional) – Sample weights.
- Returns:
float – Selection rate.