Skip to content

Commit

Permalink
Merge pull request #206 from dssg/fix-label-flipping
Browse files Browse the repository at this point in the history
Remove loc with non existing indexes
  • Loading branch information
reluzita authored Sep 11, 2024
2 parents 9adf6df + 7d6f68c commit 01d1359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aequitas/flow/methods/preprocessing/label_flipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def _label_flipping(self, y: pd.Series, s: Optional[pd.Series], scores: pd.Serie
if self.ordering_method == "residuals"
else y_flipped.loc[scores <= 0].index
)
to_flip = pd.Series(index=flip_index).fillna(False).loc[y_flipped.index]
to_flip = pd.Series(index=flip_index).fillna(False)
for group, flips in group_flips.items():
if flips > 0:
labels = y == 0
Expand Down

0 comments on commit 01d1359

Please sign in to comment.