privileged_groups (list(dict)) – Privileged groups. Format is a list
of dicts where the keys are protected_attribute_names and
the values are values in protected_attributes. Each dict
element describes a single group. See examples for more details.
unprivileged_groups (list(dict)) – Unprivileged groups in the same
format as privileged_groups.
privileged_groups (list(dict)) – Privileged groups. Format is a list
of dicts where the keys are protected_attribute_names and
the values are values in protected_attributes. Each dict
element describes a single group. See examples for more details.
unprivileged_groups (list(dict)) – Unprivileged groups in the same
format as privileged_groups.
Compute the base rate, \(Pr(Y = 1) = P/(P+N)\), optionally
conditioned on protected attributes.
Parameters:
privileged (bool, optional) – Boolean prescribing whether to
condition this metric on the privileged_groups, if True, or
the unprivileged_groups, if False. Defaults to None
meaning this metric is computed over the entire dataset.
Compute the number of negatives,
\(N = \sum_{i=1}^n \mathbb{1}[y_i = 0]\), optionally conditioned on
protected attributes.
Parameters:
privileged (bool, optional) – Boolean prescribing whether to
condition this metric on the privileged_groups, if True, or
the unprivileged_groups, if False. Defaults to None
meaning this metric is computed over the entire dataset.
Raises:
AttributeError – privileged_groups or unprivileged_groups must be
must be provided at initialization to condition on them.
Compute the number of positives,
\(P = \sum_{i=1}^n \mathbb{1}[y_i = 1]\),
optionally conditioned on protected attributes.
Parameters:
privileged (bool, optional) – Boolean prescribing whether to
condition this metric on the privileged_groups, if True, or
the unprivileged_groups, if False. Defaults to None
meaning this metric is computed over the entire dataset.
Raises:
AttributeError – privileged_groups or unprivileged_groups must be
must be provided at initialization to condition on them.