240d23ec41ee51c72a69fda93148cb534a6688ec,aif360/algorithms/inprocessing/meta_fair_classifier.py,MetaFairClassifier,fit,#MetaFairClassifier#,41

Before Change


        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()

After Change


        x_train = dataset.features
        y_train = np.where(dataset.labels.flatten() == dataset.favorable_label,
                           1, -1)
        x_control_train = np.where(
                np.isin(dataset.protected_attributes[:, sens_idx],
                        dataset.privileged_protected_attributes[sens_idx]),
                1, 0)

        self.model = self.obj.getModel(self.tau, x_train, y_train,
            x_control_train, self.seed)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: IBM/AIF360
Commit Name: 240d23ec41ee51c72a69fda93148cb534a6688ec
Time: 2020-08-05
Author: hoffman.sc@gmail.com
File Name: aif360/algorithms/inprocessing/meta_fair_classifier.py
Class Name: MetaFairClassifier
Method Name: fit


Project Name: rasbt/mlxtend
Commit Name: f1dd50395b7021c5194b3bd8e5c2900873c91f35
Time: 2015-03-13
Author: se.raschka@me.com
File Name: tests/tests_classifier/test_perceptron.py
Class Name:
Method Name:


Project Name: tensorflow/ranking
Commit Name: 6bf3f51cd0a312da842157665663c2dad9983248
Time: 2021-01-29
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/losses_impl.py
Class Name: ClickEMLoss
Method Name: _compute_latent_prob