Skip to content

Commit f6408ad

Browse files
committed
ENH add fair versions of moving company datasets
1 parent 7a2cf40 commit f6408ad

File tree

3 files changed

+4007
-2
lines changed

3 files changed

+4007
-2
lines changed

xai_ranking/datasets/_download_movers.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pandas as pd
99

1010

11-
def fetch_movers_data(test=False):
11+
def fetch_movers_data(test=False, fair=False):
1212
"""
1313
Fetches a dataset with fictional info on applications for a moving company
1414
taken from:
@@ -37,7 +37,12 @@ def fetch_movers_data(test=False):
3737
The processed moving company data.
3838
"""
3939
split = "test" if test else "train"
40-
filepath = join(dirname(abspath(__file__)), "files", f"R10_{split}_ranklib.txt")
40+
filename = (
41+
f"fair_res__bias_R10_{split}_ranklib.txt"
42+
if fair
43+
else f"R10_{split}_ranklib.txt"
44+
)
45+
filepath = join(dirname(abspath(__file__)), "files", filename)
4146
df = pd.read_csv(
4247
filepath,
4348
delimiter=" ",

0 commit comments

Comments
 (0)