def test_stacking_in_estimator_mitigation_base_and_final(self): model = StackingClassifier( estimators=[ ("pr", PrejudiceRemover(**self.fairness_info)), ("lr", LogisticRegression()), ], final_estimator=PrejudiceRemover(**self.fairness_info), passthrough=True, ) self._attempt_fit_predict(model)
def test_stacking_in_estimator_mitigation_base_only(self): model = StackingClassifier( estimators=[ ("pr", PrejudiceRemover(**self.fairness_info)), ("lr", LogisticRegression()), ] ) self._attempt_fit_predict(model)
def test_prejudice_remover_pd_cat(self): fairness_info = self.creditg_pd_cat["fairness_info"] trainable_remi = PrejudiceRemover( **fairness_info, preprocessing=self.prep_pd_cat ) self._attempt_remi_creditg_pd_cat(fairness_info, trainable_remi, 0.70, 0.80)
def test_prejudice_remover_pd_num(self): fairness_info = self.creditg_pd_num["fairness_info"] trainable_remi = PrejudiceRemover(**fairness_info) self._attempt_remi_creditg_pd_num(fairness_info, trainable_remi, 0.73, 0.83)
def test_bagging_in_estimator_mitigation_base(self): model = BaggingClassifier(base_estimator=PrejudiceRemover( **self.fairness_info)) self._attempt_fit_predict(model)
def test_adaboost_in_estimator_mitigation_base(self): model = AdaBoostClassifier(base_estimator=PrejudiceRemover( **self.fairness_info)) self._attempt_fit_predict(model)