Open
Description
Currently the test code has a lot of creating objects just to get the configuration space and then setting hyperparameters.
pipeline = SimpleRegressionPipeline(dataset_properties=dataset_properties)
cs = pipeline.get_hyperparameter_search_space()
# ...later
config = cs.sample_configuration()
config._populate_values()
cls = SimpleRegressionPipeline(
random_state=1,
dataset_properties=dataset_properties
)
cls.set_hyperparameters(config)
Seeing as the configuration space doesn't rely on anything except the dataset_properties
set through the constructor and whatever the constructor can deduce from this, it would be more syntactically clear to move get_hyperparameters_search_space()
to be a @classmethod