aif360.sklearn.metrics
.mdss_bias_score¶
-
aif360.sklearn.metrics.
mdss_bias_score
(y_true, probas_pred, X=None, subset=None, *, pos_label=1, scoring='Bernoulli', privileged=True, penalty=1e-17, **kwargs)[source]¶ Compute the bias score for a prespecified group of records using a given scoring function.
Parameters: - y_true (array-like) – Ground truth (correct) target values.
- probas_pred (array-like) – Probability estimates of the positive class.
- X (DataFrame, optional) – The dataset (containing the features) that was
used to predict
probas_pred
. If not specified, the subset is returned as indices. - subset (dict, optional) – Mapping of column names to list of values.
Samples are included in the subset if they match any value in each
of the columns provided. If
X
is not specified,subset
may be of the form{'index': [0, 1, ...]}
orNone
. IfNone
, score over the full set (note:penalty
is irrelevant in this case). - pos_label (scalar, optional) – Label of the positive class.
- scoring (str or class) – One of ‘Bernoulli’ or ‘BerkJones’ or
subclass of
aif360.metrics.mdss.ScoringFunctions.ScoringFunction
. - privileged (bool) – Flag for which direction to scan: privileged
(
True
) implies negative (observed worse than predicted outcomes) while unprivileged (False
) implies positive (observed better than predicted outcomes). - penalty (scalar) – Penalty coefficient. Should be positive. The higher the penalty, the less complex (number of features and feature values) the highest scoring subset that gets returned is.
- **kwargs – Additional kwargs to be passed to
scoring
(not includingdirection
).
Returns: float – Bias score for the given group.
See also