From 871732f90d804f390e755f0fe884f1eb9f1ec171 Mon Sep 17 00:00:00 2001 From: Chris Russell Date: Thu, 25 Jul 2024 12:00:37 +0100 Subject: [PATCH] reorder conditional metrics to match defaults --- src/oxonfair/utils/conditional_group_metrics.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/oxonfair/utils/conditional_group_metrics.py b/src/oxonfair/utils/conditional_group_metrics.py index 308b962..d3eab2a 100644 --- a/src/oxonfair/utils/conditional_group_metrics.py +++ b/src/oxonfair/utils/conditional_group_metrics.py @@ -62,10 +62,8 @@ def build_cond_form(metric, weighting): "true_neg_rate": true_neg_rate, "false_pos_rate": false_pos_rate, "false_neg_rate": false_neg_rate, - "pos_pred_rate": pos_pred_rate, - "neg_pred_rate": neg_pred_rate, "pos_data_rate": pos_data_rate, - "neg_data_rate": neg_data_rate, + "pos_pred_rate": pos_pred_rate, } @@ -83,8 +81,8 @@ def build_cond_form(metric, weighting): abs_diff_pred_proportion = build_cond_form(gm.abs_diff_pred_proportion, total_weights) 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} + '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}