aif360.sklearn.metrics.between_group_generalized_entropy_error

aif360.sklearn.metrics.between_group_generalized_entropy_error(y_true, y_pred, prot_attr=None, priv_group=None, alpha=2, pos_label=1)[source]

Compute the between-group generalized entropy.

Between-group generalized entropy index is proposed as a group fairness measure in [1] and is one of two terms that the generalized entropy index decomposes to.

Parameters:
  • y_true (pandas.Series) – Ground truth (correct) target values.

  • y_pred (array-like) – Estimated targets as returned by a classifier.

  • prot_attr (array-like, optional) – Protected attribute(s). If None, all protected attributes in y_true are used.

  • priv_group (scalar, optional) – The label of the privileged group. If provided, the index will be computed between only the privileged and unprivileged groups. Otherwise, the index will be computed between all groups defined by the prot_attr.

  • alpha (scalar, optional) – Parameter that regulates the weight given to distances between values at different parts of the distribution. A value of 0 is equivalent to the mean log deviation, 1 is the Theil index, and 2 is half the squared coefficient of variation.

  • pos_label (scalar, optional) – The label of the positive class.

References