Skip to content

Commit 7140449

Browse files
authored
Merge pull request #36 from Chenghao-Tan/feat--CFRL-Support
feat: Add support for CFRL (and dataset/dependency fixes)
2 parents 4b565db + 9d136e1 commit 7140449

25 files changed

+5753
-17
lines changed
115 KB
Binary file not shown.
283 KB
Binary file not shown.
26 Bytes
Binary file not shown.
-364 Bytes
Binary file not shown.
80.4 KB
Binary file not shown.
279 Bytes
Binary file not shown.
-62 Bytes
Binary file not shown.
-62 Bytes
Binary file not shown.

data/catalog/_data_main/process_data/process_adult_data.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919

2020

2121
def check_data_file(file_name):
22-
this_files_directory = os.path.dirname(os.path.realpath(__file__))
23-
files_in_directory = os.listdir(
24-
this_files_directory
25-
) # get the current directory listing
22+
raw_data_dir = os.path.join(
23+
os.path.dirname(os.path.realpath(__file__)), "..", "raw_data"
24+
)
25+
files_in_directory = os.listdir(raw_data_dir) # get the current directory listing
2626

27-
print(f"Looking for file {file_name} in the {this_files_directory} directory..")
27+
print(f"Looking for file {file_name} in the {raw_data_dir} directory..")
2828

2929
if file_name not in files_in_directory:
30-
full_file_name = os.path.join(this_files_directory, file_name)
30+
full_file_name = os.path.join(raw_data_dir, file_name)
3131
print("'%s' not found! Downloading from UCI Archive..." % file_name)
3232
addr = (
3333
"http://archive.ics.uci.edu/ml/machine-learning-databases/adult/%s"

data/catalog/_data_main/process_data/process_compas_data.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121

2222

2323
def check_data_file(file_name):
24-
this_files_directory = os.path.dirname(os.path.realpath(__file__))
25-
files = os.listdir(this_files_directory) # get the current directory listing
24+
raw_data_dir = os.path.join(
25+
os.path.dirname(os.path.realpath(__file__)), "..", "raw_data"
26+
)
27+
files = os.listdir(raw_data_dir) # get the current directory listing
2628

27-
print(f"Looking for file {file_name} in the {this_files_directory} directory..")
29+
print(f"Looking for file {file_name} in the {raw_data_dir} directory..")
2830

2931
if file_name not in files:
30-
full_file_name = os.path.join(this_files_directory, file_name)
32+
full_file_name = os.path.join(raw_data_dir, file_name)
3133
print("'%s' not found! Downloading from GitHub..." % file_name)
3234
addr = "https://raw.githubusercontent.com/propublica/compas-analysis/master/compas-scores-two-years.csv"
3335
response = urllib.request.urlopen(addr)

0 commit comments

Comments
 (0)