614ff7af666ecaab6dfa42f7377ec4c1608b1ff6,aif360/datasets/adult_dataset.py,AdultDataset,__init__,#AdultDataset#,25
Before Change
train_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"../data/raw/adult/adult.data")
test_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"../data/raw/adult/adult.test")
// as given by adult.names
column_names = ["age", "workclass", "fnlwgt", "education",
"education-num", "marital-status", "occupation", "relationship",
"race", "sex", "capital-gain", "capital-loss", "hours-per-week",
"native-country", "income-per-year"]
train = pd.read_csv(train_path, header=None, names=column_names,
skipinitialspace=True, na_values=na_values)
test = pd.read_csv(test_path, header=0, names=column_names,
skipinitialspace=True, na_values=na_values)
df = pd.concat([train, test], ignore_index=True)
super(AdultDataset, self).__init__(df=df, label_name=label_name,
After Change
train_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"..", "data", "raw", "adult", "adult.data")
test_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"..", "data", "raw", "adult", "adult.test")
// as given by adult.names
column_names = ["age", "workclass", "fnlwgt", "education",
"education-num", "marital-status", "occupation", "relationship",
"race", "sex", "capital-gain", "capital-loss", "hours-per-week",
"native-country", "income-per-year"]
try:
train = pd.read_csv(train_path, header=None, names=column_names,
skipinitialspace=True, na_values=na_values)
test = pd.read_csv(test_path, header=0, names=column_names,
skipinitialspace=True, na_values=na_values)
except IOError as err:
print("IOError: {}".format(err))
print("To use this class, please download the following files:")
print("\n\thttps://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data")
print("\thttps://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.test")
print("\thttps://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.names")
print("\nand place them, as-is, in the folder:")
print("\n\t{}\n".format(os.path.abspath(os.path.join(
os.path.abspath(__file__), "..", "..", "data", "raw", "adult"))))
import sys
sys.exit(1)
df = pd.concat([train, test], ignore_index=True)
super(AdultDataset, self).__init__(df=df, label_name=label_name,
favorable_classes=favorable_classes,

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 25
Instances
Project Name: IBM/AIF360
Commit Name: 614ff7af666ecaab6dfa42f7377ec4c1608b1ff6
Time: 2018-09-14
Author: hoffman.sc@gmail.com
File Name: aif360/datasets/adult_dataset.py
Class Name: AdultDataset
Method Name: __init__
Project Name: IBM/AIF360
Commit Name: 614ff7af666ecaab6dfa42f7377ec4c1608b1ff6
Time: 2018-09-14
Author: hoffman.sc@gmail.com
File Name: aif360/datasets/adult_dataset.py
Class Name: AdultDataset
Method Name: __init__
Project Name: IBM/AIF360
Commit Name: 614ff7af666ecaab6dfa42f7377ec4c1608b1ff6
Time: 2018-09-14
Author: hoffman.sc@gmail.com
File Name: aif360/datasets/compas_dataset.py
Class Name: CompasDataset
Method Name: __init__
Project Name: IBM/AIF360
Commit Name: 614ff7af666ecaab6dfa42f7377ec4c1608b1ff6
Time: 2018-09-14
Author: hoffman.sc@gmail.com
File Name: aif360/datasets/bank_dataset.py
Class Name: BankDataset
Method Name: __init__