From 0914ff75f6d5ef37e8197a139007b85b88271836 Mon Sep 17 00:00:00 2001 From: Chris Russell Date: Thu, 25 Jul 2024 12:00:00 +0100 Subject: [PATCH] add wachter measures --- src/oxonfair/utils/group_metrics.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/oxonfair/utils/group_metrics.py b/src/oxonfair/utils/group_metrics.py index 1b77c5a..491d585 100644 --- a/src/oxonfair/utils/group_metrics.py +++ b/src/oxonfair/utils/group_metrics.py @@ -218,6 +218,13 @@ def ge1(x): - (TN+FP)/ge1(TTN+TFP)[:, np.newaxis]), 'Absolute Difference of Proportion of Labels', total_metric=True) +wachter_measures = {'pos_data_proportion': pos_data_proportion, + 'neg_data_proportion': neg_data_proportion, + 'diff_data_proportion': diff_data_proportion, + 'pos_pred_proportion': pos_pred_proportion, + 'neg_pred_proportion': neg_pred_proportion, + 'diff_pred_proportion': diff_pred_proportion} + # directed bias amplification # see: https://proceedings.mlr.press/v139/wang21t/wang21t.pdf # warning do not use when enforcing fairness