Пример #1
0
 def test_pipeline_builtin(self):
     steps1 = [PipelineStep(name="transformer", learner=DummyTransformer)]
     steps2 = [PipelineStep(name="estimator", learner=DummyRegressor)]
     steps3 = [
         PipelineStep(name="transformer", learner=DummyTransformer),
         PipelineStep(name="estimator", learner=DummyRegressor),
     ]
     for steps in (steps1, steps2, steps3):
         self.assertTrue(test_learner(Pipeline, steps=steps))
Пример #2
0
 def test_learner_builtin(self):
     learner_args = []
     learner_kwargs = {}
     for learner in (MLPClassifier, MLPRegressor):
         self.assertTrue(
             test_learner(learner, *learner_args, **learner_kwargs))
Пример #3
0
 def test_dummy_transformer_builtin(self):
     self.assertTrue(test_learner(DummyTransformer))
Пример #4
0
 def test_learner_builtin(self):
     learner_kwargs = {"a": 1, "b": 2, "c": 3}
     self.assertTrue(test_learner(Learner, **learner_kwargs))
Пример #5
0
 def test_dummy_classifier_builtin(self):
     learner_kwargs = ({'strategy': 'mean'}, {'strategy': 'random'})
     for kwargs in learner_kwargs:
         self.assertTrue(test_learner(DummyClassifier, **kwargs))
 def test_learner_builtin(self):
     learner_args = []
     learner_kwargs = dict(kernel_size=1, padding=0, maxpool_size=1)
     for learner in (CNNClassifier, CNNRegressor):
         self.assertTrue(
             test_learner(learner, *learner_args, **learner_kwargs))
 def test_transformer_builtin(self):
     for transformer in [MinMaxScaler, StandardScaler]:
         self.assertTrue(test_learner(transformer))
Пример #8
0
 def test_learner_builtin(self):
     learner_args = []
     learner_kwargs = {}
     for learner in (LinearRegressor, LogisticRegression):
         self.assertTrue(
             test_learner(learner, *learner_args, **learner_kwargs))
Пример #9
0
 def test_transformer_builtin(self):
     for transformer in [FeatureDrop, VarianceThreshold]:
         self.assertTrue(test_learner(transformer, columns=[]))