diff --git a/fairlearn/reductions/_moments/cdf_demographic_parity_moment.py b/fairlearn/reductions/_moments/cdf_demographic_parity_moment.py index 4cdcfdff3..8fb1fec55 100644 --- a/fairlearn/reductions/_moments/cdf_demographic_parity_moment.py +++ b/fairlearn/reductions/_moments/cdf_demographic_parity_moment.py @@ -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 diff --git a/fairlearn/reductions/_moments/weighted_error_rate.py b/fairlearn/reductions/_moments/weighted_error_rate.py index 3d0add7c0..873c4448d 100644 --- a/fairlearn/reductions/_moments/weighted_error_rate.py +++ b/fairlearn/reductions/_moments/weighted_error_rate.py @@ -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