本文整理汇总了Python中autosklearn.pipeline.classification.SimpleClassificationPipeline.get_hyperparameters方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleClassificationPipeline.get_hyperparameters方法的具体用法?Python SimpleClassificationPipeline.get_hyperparameters怎么用?Python SimpleClassificationPipeline.get_hyperparameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类autosklearn.pipeline.classification.SimpleClassificationPipeline
的用法示例。
在下文中一共展示了SimpleClassificationPipeline.get_hyperparameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_hyperparameter_search_space
# 需要导入模块: from autosklearn.pipeline.classification import SimpleClassificationPipeline [as 别名]
# 或者: from autosklearn.pipeline.classification.SimpleClassificationPipeline import get_hyperparameters [as 别名]
def test_get_hyperparameter_search_space(self):
cs = SimpleClassificationPipeline().get_hyperparameter_search_space()
self.assertIsInstance(cs, ConfigurationSpace)
conditions = cs.get_conditions()
self.assertEqual(len(cs.get_hyperparameter(
'rescaling:__choice__').choices), 6)
self.assertEqual(len(cs.get_hyperparameter(
'classifier:__choice__').choices), 16)
self.assertEqual(len(cs.get_hyperparameter(
'preprocessor:__choice__').choices), 13)
hyperparameters = cs.get_hyperparameters()
self.assertEqual(172, len(hyperparameters))
#for hp in sorted([str(h) for h in hyperparameters]):
# print hp
# The four parameters which are always active are classifier,
# preprocessor, imputation strategy and scaling strategy
self.assertEqual(len(hyperparameters) - 6, len(conditions))