Skip to content

Commit

Permalink
remove calls to loss from problem.py
Browse files Browse the repository at this point in the history
This will break lexicase but also allow X_protected to be passed until @shakiba-shb fixes `metrics.loss()`
  • Loading branch information
lacava authored Jan 30, 2024
1 parent 06ca9cf commit fba7526
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fomo/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ def _evaluate(self, sample_weight, out, *args, **kwargs):
j += 1

out['F'] = np.asarray(f)
fn, fng = metrics.loss(est, X, y, 'FNR', **self.metric_kwargs)
out['fn'] = fn #FNR of all samples
out['fng'] = fng #FNR of each group

class SurrogateProblem(ElementwiseProblem):
""" The evaluation function for each candidate weights.
Expand Down Expand Up @@ -175,9 +172,6 @@ def _evaluate(self, x, out, *args, **kwargs):
j += 1

out['F'] = np.asarray(f)
fn, fng = metrics.loss(est, X, y, 'FNR', **self.metric_kwargs)
out['fn'] = fn #FNR of all samples
out['fng'] = fng #FNR of every group

class MLPProblem(SurrogateProblem):
""" The evaluation function for each candidate weights.
Expand All @@ -198,4 +192,4 @@ class InterLinearProblem(SurrogateProblem):
"""
def _get_surrogate(self):
return InterLinear(self.X_protected)
return InterLinear(self.X_protected)

0 comments on commit fba7526

Please sign in to comment.