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))
def test_learner_builtin(self): learner_args = [] learner_kwargs = {} for learner in (MLPClassifier, MLPRegressor): self.assertTrue( test_learner(learner, *learner_args, **learner_kwargs))
def test_dummy_transformer_builtin(self): self.assertTrue(test_learner(DummyTransformer))
def test_learner_builtin(self): learner_kwargs = {"a": 1, "b": 2, "c": 3} self.assertTrue(test_learner(Learner, **learner_kwargs))
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))
def test_learner_builtin(self): learner_args = [] learner_kwargs = {} for learner in (LinearRegressor, LogisticRegression): self.assertTrue( test_learner(learner, *learner_args, **learner_kwargs))
def test_transformer_builtin(self): for transformer in [FeatureDrop, VarianceThreshold]: self.assertTrue(test_learner(transformer, columns=[]))