Skip to content

Commit

Permalink
adjusting interface of evaluate fairness
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMRuss committed Nov 26, 2024
1 parent ae117c4 commit 8d87613
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/oxonfair/learners/fair.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,9 @@ def evaluate_fairness(self, data=None, groups=None, factor=None, *,

collect = pd.concat([collect, new_pd], axis='columns')
collect.columns = ['original', 'updated']
else:
collect = pd.concat([collect,], axis='columns')
collect.columns = ['original']

return collect

Expand Down Expand Up @@ -822,7 +825,9 @@ def evaluate_groups(self, data=None, groups=None, metrics=None, fact=None, *,
verbose=verbose)

out = updated
if return_original:
if self.frontier is None:
out = pd.concat([updated, ], keys=['original', ])
elif return_original:
out = pd.concat([original, updated], keys=['original', 'updated'])
return out

Expand Down

0 comments on commit 8d87613

Please sign in to comment.