diff --git a/src/oxonfair/learners/fair.py b/src/oxonfair/learners/fair.py index 342435e..605ef34 100644 --- a/src/oxonfair/learners/fair.py +++ b/src/oxonfair/learners/fair.py @@ -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 @@ -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