Esempio n. 1
0
    def test_with_hyperopt(self):
        from lale.lib.lale import Hyperopt
        from lale.lib.sklearn import BaggingClassifier

        clf = BaggingClassifier(base_estimator=LogisticRegression())
        trained = clf.auto_configure(self.X_train, self.y_train, Hyperopt, max_evals=1)
        print(trained.to_json())
Esempio n. 2
0
 def test_pipeline_with_hyperopt(self):
     from lale.lib.sklearn import BaggingClassifier
     from lale.lib.lale import Hyperopt
     clf = BaggingClassifier(base_estimator=PCA() >> LogisticRegression())
     trained = clf.auto_configure(self.X_train,
                                  self.y_train,
                                  Hyperopt,
                                  max_evals=1)