aif360.sklearn.metrics.generalized_entropy_error(y_true, y_pred, alpha=2, pos_label=1)[source]

Compute the generalized entropy.

Generalized entropy index is proposed as a unified individual and group fairness measure in [1].

Uses \(b_i = \hat{y}_i - y_i + 1\). See generalized_entropy_index() for details.

  • y_true (array-like) – Ground truth (correct) target values.
  • y_pred (array-like) – Estimated targets as returned by a classifier.
  • 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.


[1]T. Speicher, H. Heidari, N. Grgic-Hlaca, K. P. Gummadi, A. Singla, A. Weller, and M. B. Zafar, “A Unified Approach to Quantifying Algorithmic Unfairness: Measuring Individual and Group Unfairness via Inequality Indices,” ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2018.