1b6587331ec77d295e2261de12e13974b7d1a46a,aif360/algorithms/inprocessing/meta_fair_classifier.py,MetaFairClassifier,fit,#MetaFairClassifier#Any#,46
Before Change
PrejudiceRemover: Returns self.
data = np.column_stack([dataset.features, dataset.labels])
columns = dataset.feature_names + dataset.label_names
train_df = pd.DataFrame(data=data, columns=columns)
x_train = dataset.features
//print([dataset.favorable_label])
y_train = np.array([1 if y == [dataset.favorable_label] else -1 for y in dataset.labels])
x_control_train = np.array(train_df[self.sensitive_attr])
//print(x_train, y_train, x_control_train)
all_sensitive_attributes = dataset.protected_attribute_names
After Change
if not self.sensitive_attr:
self.sensitive_attr = dataset.protected_attribute_names[0]
sens_index = dataset.feature_names.index(self.sensitive_attr)
x_train = dataset.features
y_train = np.array([1 if y == [dataset.favorable_label] else
-1 for y in dataset.labels])
x_control_train = x_train[:, sens_index].copy()
self.model = self.obj.getModel(self.tau, x_train, y_train,
x_control_train)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances
Project Name: IBM/AIF360
Commit Name: 1b6587331ec77d295e2261de12e13974b7d1a46a
Time: 2018-10-16
Author: shoffman@ibm.com
File Name: aif360/algorithms/inprocessing/meta_fair_classifier.py
Class Name: MetaFairClassifier
Method Name: fit
Project Name: scipy/scipy
Commit Name: 04e049d888db8382caed35bb5dcae12b977b0474
Time: 2014-07-07
Author: jacobcvt12@gmail.com
File Name: scipy/interpolate/tests/test_fitpack2.py
Class Name: TestUnivariateSpline
Method Name: test_out_of_range_regression
Project Name: deepchem/deepchem
Commit Name: 303e3983b998ec2037a21f59aac932dddd834e75
Time: 2020-08-13
Author: bharath@Bharaths-MBP.zyxel.com
File Name: deepchem/data/tests/test_legacy.py
Class Name:
Method Name: test_reshard
Project Name: PyMVPA/PyMVPA
Commit Name: 3c1eafeea79d946575ea5b6b5cb02f945897d2fd
Time: 2009-12-10
Author: michael.hanke@gmail.com
File Name: mvpa/tests/test_mapper.py
Class Name:
Method Name: test_flatten
Project Name: scikit-image/scikit-image
Commit Name: 0e05a3bf73086c6d68fab0861ec0cfef7f3a8141
Time: 2019-03-19
Author: juan.nunez-iglesias@monash.edu
File Name: skimage/morphology/tests/test_watershed.py
Class Name: TestWatershed
Method Name: test_watershed08