예제 #1
0
    def test_pipeline_parameters(self):
        pgo = PGO.load_pgo_file(example_pgo_fp)

        trainable = PCA() >> LogisticRegression()
        parameters = get_grid_search_parameter_grids(trainable,
                                                     num_samples=2,
                                                     pgo=pgo)
예제 #2
0
    def test_lr_parameters(self):
        pgo = PGO.load_pgo_file(example_pgo_fp)

        lr = LogisticRegression()
        parameters = get_grid_search_parameter_grids(lr,
                                                     num_samples=2,
                                                     pgo=pgo)
예제 #3
0
    def test_lr_run(self):
        pgo = PGO.load_pgo_file(example_pgo_fp)

        from lale.lib.lale import Hyperopt
        from sklearn.datasets import load_iris

        lr = LogisticRegression()
        clf = Hyperopt(estimator=lr, max_evals=5, pgo=pgo)
        iris = load_iris()
        clf.fit(iris.data, iris.target)
예제 #4
0
    def test_lr_run(self):
        pgo = PGO.load_pgo_file(example_pgo_fp)

        from sklearn.datasets import load_iris
        from sklearn.metrics import accuracy_score, make_scorer
  
        lr = LogisticRegression()

        with warnings.catch_warnings():
            warnings.simplefilter("ignore")
            clf = lale.lib.lale.GridSearchCV(
                estimator=lr, lale_num_samples=2, lale_num_grids=5,
                cv=5, pgo=pgo, scoring=make_scorer(accuracy_score))
            iris = load_iris()
            clf.fit(iris.data, iris.target)
예제 #5
0
    def test_lr_parameters(self):
        pgo = PGO.load_pgo_file(example_pgo_fp)

        lr = LogisticRegression()
        parameters: SearchSpace = hyperopt_search_space(lr, pgo=pgo)
예제 #6
0
 def test_pgo_sample(self):
     pgo = PGO.load_pgo_file(example_pgo_fp)
     lr_c = pgo["LogisticRegression"]["C"]
     dist = PGO.FrequencyDistribution.asIntegerValues(lr_c.items())
     samples: List[str] = dist.samples(10)
예제 #7
0
 def test_pgo_load(self):
     pgo = PGO.load_pgo_file(example_pgo_fp)
     lr_c = pgo["LogisticRegression"]["C"]