@@ -88,13 +88,14 @@ def __init__(
88
88
Args:
89
89
label_values_or_threshold (Any): List of label values or threshold to indicate positive
90
90
outcome used for bias metrics.
91
- facet_name (Any): String or List of strings of sensitive attribute(s) in the input data
91
+ facet_name (Any): String or List of strings of sensitive attribute(s) in the input data
92
92
for which we like to compare metrics.
93
93
facet_values_or_threshold (list): Optional list of values to form a sensitive group or
94
94
threshold for a numeric facet column that defines the lower bound of a sensitive
95
95
group. Defaults to considering each possible value as sensitive group and
96
- computing metrics vs all the other examples.
97
- If facet_name is a list, this needs to be None or a List of lists or None, with the same length.
96
+ computing metrics vs all the other examples.
97
+ If facet_name is a list, this needs to be None or a List consisting of lists or None
98
+ with the same length as facet_name list.
98
99
group_name (str): Optional column name or index to indicate a group column to be used
99
100
for the bias metric 'Conditional Demographic Disparity in Labels - CDDL' or
100
101
'Conditional Demographic Disparity in Predicted Labels - CDDPL'.
@@ -107,7 +108,8 @@ def __init__(
107
108
facet_list = []
108
109
for i , single_facet_name in enumerate (facet_name ):
109
110
facet = {"name_or_index" : single_facet_name }
110
- if facet_values_or_threshold is not None : _set (facet_values_or_threshold [i ], "value_or_threshold" , facet )
111
+ if facet_values_or_threshold is not None :
112
+ _set (facet_values_or_threshold [i ], "value_or_threshold" , facet )
111
113
facet_list .append (facet )
112
114
else :
113
115
raise ValueError ("Wrong combination of argument values passed" )
0 commit comments