Skip to content

Commit

Permalink
change the father class of WeightedErrorRate to ClassificationMoment
Browse files Browse the repository at this point in the history
Signed-off-by: Acorn <wanglj17@mails.tsinghua.edu.cn>
  • Loading branch information
Acorn committed Aug 20, 2020
1 parent 34fc5d1 commit acbdedc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, loss, y_range, difference_bound=None, grids=[], grid_num=41):
super().__init__()
self.utility_parity = UtilityParity(difference_bound=difference_bound)
self.loss = loss
self.objective = WeightedErrorRate(self.loss)
self.objective = WeightedErrorRate()
self.grids = grids
self.grid_num = grid_num
self.y_range = y_range
Expand Down
4 changes: 2 additions & 2 deletions fairlearn/reductions/_moments/weighted_error_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class WeightedErrorRate(ClassificationMoment):

short_name = "Weighted Error Rate"

def __init__(self, loss):
super(WeightedErrorRate, self).__init__(loss)
def __init__(self):
super(WeightedErrorRate, self).__init__()

'''for what we need here is augmented data. Hence to avoid unnecessary calculation, we use
augmented data having been calculated in regression_moment here and directly return in
Expand Down

0 comments on commit acbdedc

Please sign in to comment.