fixed bug on target class for subgroup
Browse files- bias_auc.py +1 -1
bias_auc.py
CHANGED
@@ -76,7 +76,7 @@ class BiasAUC(evaluate.Metric):
|
|
76 |
"""Returns label and output score from `targets` and `labels`
|
77 |
if `subgroup` is in list of targeted groups found in `targets`
|
78 |
"""
|
79 |
-
target_class = target_class if target_class is not None else
|
80 |
for target, label, result in zip(targets, labels, outputs):
|
81 |
if subgroup in target:
|
82 |
yield label, result[target_class]
|
|
|
76 |
"""Returns label and output score from `targets` and `labels`
|
77 |
if `subgroup` is in list of targeted groups found in `targets`
|
78 |
"""
|
79 |
+
target_class = target_class if target_class is not None else 1
|
80 |
for target, label, result in zip(targets, labels, outputs):
|
81 |
if subgroup in target:
|
82 |
yield label, result[target_class]
|