Update bias_auc.py
Browse files- bias_auc.py +6 -3
bias_auc.py
CHANGED
@@ -29,6 +29,8 @@ Args:
|
|
29 |
target list[list[str]]: list containing list of group targeted for each item
|
30 |
label list[int]: list containing label index for each item
|
31 |
output list[list[float]]: list of model output values for each
|
|
|
|
|
32 |
Returns (for each subgroup in target):
|
33 |
'Subgroup' : Subgroup AUC score,
|
34 |
'BPSN' : BPSN (Background Positive, Subgroup Negative) AUC,
|
@@ -47,13 +49,14 @@ Example:
|
|
47 |
... [0.4341845214366913, 0.5658154487609863],
|
48 |
... [0.400595098733902, 0.5994048714637756],
|
49 |
... [0.3840397894382477, 0.6159601807594299]]
|
|
|
50 |
>>> metric = load('Intel/bias_auc')
|
51 |
>>> metric.add_batch(target=target,
|
52 |
label=label,
|
53 |
output=output)
|
54 |
-
>>> metric.compute(target=
|
55 |
-
label=
|
56 |
-
output=
|
57 |
subgroups = None)
|
58 |
|
59 |
"""
|
|
|
29 |
target list[list[str]]: list containing list of group targeted for each item
|
30 |
label list[int]: list containing label index for each item
|
31 |
output list[list[float]]: list of model output values for each
|
32 |
+
subgroup list[str] (optional): list of subgroups that appear in target to compute metric over
|
33 |
+
|
34 |
Returns (for each subgroup in target):
|
35 |
'Subgroup' : Subgroup AUC score,
|
36 |
'BPSN' : BPSN (Background Positive, Subgroup Negative) AUC,
|
|
|
49 |
... [0.4341845214366913, 0.5658154487609863],
|
50 |
... [0.400595098733902, 0.5994048714637756],
|
51 |
... [0.3840397894382477, 0.6159601807594299]]
|
52 |
+
|
53 |
>>> metric = load('Intel/bias_auc')
|
54 |
>>> metric.add_batch(target=target,
|
55 |
label=label,
|
56 |
output=output)
|
57 |
+
>>> metric.compute(target=target,
|
58 |
+
label=label,
|
59 |
+
output=output,
|
60 |
subgroups = None)
|
61 |
|
62 |
"""
|