Skip to content

Commit da5f1c7

Browse files
committed
remove unused function
1 parent af1ef4f commit da5f1c7

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

tests/metrics/test_fairness.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,20 +173,6 @@ def set_favorable_outcomes(group: np.ndarray, target_rate: float = 0.5) -> None:
173173
group[indices, -1] = 1
174174

175175

176-
def increase_selection_rate(group: np.ndarray, increase_factor: float = 0.75) -> np.ndarray:
177-
modified_group = group.copy()
178-
179-
unfavorable_indices = np.where(modified_group[:, -1] == 0)[0]
180-
181-
num_to_flip = int(len(unfavorable_indices) * increase_factor)
182-
183-
if num_to_flip > 0:
184-
indices_to_flip = np.random.choice(unfavorable_indices, size=num_to_flip, replace=False)
185-
modified_group[indices_to_flip, -1] = 1
186-
187-
return modified_group
188-
189-
190176
y, y_pred = truth_predict_output()
191177
privileged, unprivileged = get_privileged_unprivileged_split()
192178
data, data_pred = get_labeled_data()

0 commit comments

Comments
 (0)