def test_stacking_pre_estimator_mitigation_ensemble(self): model = DisparateImpactRemover( **self.fairness_info) >> StackingClassifier(estimators=[( "dtc", DecisionTreeClassifier()), ("lr", LogisticRegression())]) 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_with_lale_classifiers(self): from lale.lib.sklearn import StackingClassifier clf = StackingClassifier(estimators=[("base", LogisticRegression())]) trained = clf.fit(self.X_train, self.y_train) trained.predict(self.X_test)