def _cs_impl(cls): # TODO target and prediction params = { "function": CatP(choice, items=cls.names()), "target": CatP(choice, items=["Y"]), "prediction": CatP(choice, items=["Z"]), } return CS(nodes=[Node(params=params)])
def _cs_impl(cls): # TODO target and prediction params = { 'function': CatP(choice, items=cls.names()), 'input_field': CatP(choice, items=['S']), 'output_field': CatP(choice, items=['S']) } return TransformerCS(Node(params=params))
def _cs_impl(cls) -> CS: params = { "path": FixedP("./"), "name": FixedP("blalbairis.arff"), "matrices_hash": FixedP("1234567890123456789"), } return CS(nodes=[Node(params=params)])
def _cs_impl(cls): # TODO target and prediction params = { 'function': CatP(choice, items=cls.names()), 'target': CatP(choice, items=['Y']), 'prediction': CatP(choice, items=['Z']) } return TransformerCS(Node(params=params))
def _cs_impl(cls): params = { 'path': FixedP('./'), 'name': FixedP('iris.arff'), 'description': FixedP('No description.'), 'matrices_hash': FixedP('1234567890123456789') } return TransformerCS(Node(params=params))
def _cs_impl(cls): params = { 'score_func': CatP( choice, items=["chi2", "f_classif", "mutual_info_classif"] ), 'k_perc': RealP(uniform, low=0.0, high=1.0) } return TransformerCS(nodes=[Node(params=params)])
def _cs_impl(cls) -> CS: # todo: set random seed; set 'cache_size' param = { "n": RealP(uniform, low=0.0, high=1.0), "copy": FixedP(True), "whiten": FixedP(False), "svd_solver": FixedP("auto"), "tol": FixedP(0.0), "iterated_power": FixedP("auto"), } return CS(nodes=[Node(param)])
def _cs_impl(cls): # todo: set random seed; set 'cache_size' kernel_linear = Node({"kernel": FixedP("linear")}) kernel_poly = Node( { "kernel": FixedP("poly"), "degree": IntP(uniform, low=0, high=10), "coef0": RealP(uniform, low=0.0, high=100), } ) kernel_rbf = Node({"kernel": FixedP("rbf")}) kernel_sigmoid = Node({"kernel": FixedP("sigmoid"), "coef0": RealP(uniform, low=0.0, high=100),}) kernel_nonlinear = Node( {"gamma": RealP(uniform, low=0.00001, high=100)}, children=[kernel_poly, kernel_rbf, kernel_sigmoid], ) top = Node( { "C": RealP(uniform, low=1e-4, high=100), "shrinking": CatP(choice, items=[True, False]), "probability": FixedP(False), "tol": OrdP(choice, items=[0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000, 10000,],), "class_weight": CatP(choice, items=[None, "balanced"]), # 'verbose': [False], "max_iter": FixedP(1000000), "decision_function_shape": CatP(choice, items=["ovr", "ovo"]), }, children=[kernel_linear, kernel_nonlinear], ) return CS(nodes=[top])
def _cs_impl(cls): params = { "criterion": CatP(choice, items=["gini", "entropy"]), "splitter": FixedP("best"), "class_weight": CatP(choice, items=[None, "balanced"]), "max_features": CatP(choice, items=["auto", "sqrt", "log2", None]), "max_depth": IntP(uniform, low=2, high=1000), "min_samples_split": RealP(uniform, low=1e-6, high=0.3), "min_samples_leaf": RealP(uniform, low=1e-6, high=0.3), "min_weight_fraction_leaf": RealP(uniform, low=0.0, high=0.3), "min_impurity_decrease": RealP(uniform, low=0.0, high=0.2), } return CS(nodes=[Node(params=params)])
def _cs_impl(cls): params = { 'criterion': CatP(choice, items=['gini', 'entropy']), 'splitter': FixedP('best'), 'class_weight': CatP(choice, items=[None, 'balanced']), 'max_features': CatP(choice, items=['auto', 'sqrt', 'log2', None]), 'max_depth': IntP(uniform, low=2, high=1000), 'min_samples_split': RealP(uniform, low=1e-6, high=0.3), 'min_samples_leaf': RealP(uniform, low=1e-6, high=0.3), 'min_weight_fraction_leaf': RealP(uniform, low=0.0, high=0.3), 'min_impurity_decrease': RealP(uniform, low=0.0, high=0.2) } return TransformerCS(nodes=[Node(params=params)])
def _cs_impl(cls): n_estimators = [100, 500, 1000, 3000, 5000] params = { 'bootstrap': CatP(choice, items=[True, False]), 'criterion': CatP(choice, items=['gini', 'entropy']), 'max_features': CatP(choice, items=['auto', 'sqrt', 'log2', None]), 'min_impurity_decrease': RealP(uniform, low=0.0, high=0.2), 'min_samples_split': RealP(uniform, low=1e-6, high=0.3), 'min_samples_leaf': RealP(uniform, low=1e-6, high=0.3), 'min_weight_fraction_leaf': RealP(uniform, low=0.0, high=0.3), 'max_depth': IntP(uniform, low=2, high=1000), 'n_estimators': CatP(choice, items=n_estimators), } return TransformerCS(nodes=[Node(params=params)])
def _cs_impl(cls): # TODO target and prediction params = { 'input_field1': CatP(choice, items=['S']), 'input_field2': CatP(choice, items=['S']), 'direction': CatP(choice, items=[0, 1]), 'output_field': CatP(choice, items=['S']) } return TransformerCS(Node(params=params)) # TODO: create a proper test? # p = Pipeline( # File('iris.arff'), # ApplyUsing(NB()), # Report('$X $Y $Z'), # MConcat(fields=['X','Y','Z'], output_field='A'), # Report('$A') # ) # p.apply()
def _cs_impl(cls): # todo: set random seed; set 'cache_size' kernel_linear = Node({'kernel': FixedP('linear')}) kernel_poly = Node({ 'kernel': FixedP('poly'), 'degree': IntP(uniform, low=0, high=10), 'coef0': RealP(uniform, low=0.0, high=100) }) kernel_rbf = Node({'kernel': FixedP('rbf')}) kernel_sigmoid = Node({ 'kernel': FixedP('sigmoid'), 'coef0': RealP(uniform, low=0.0, high=100), }) kernel_nonlinear = Node( {'gamma': RealP(uniform, low=0.00001, high=100)}, children=[kernel_poly, kernel_rbf, kernel_sigmoid]) top = Node( { 'C': RealP(uniform, low=1e-4, high=100), 'shrinking': CatP(choice, items=[True, False]), 'probability': FixedP(False), 'tol': OrdP(choice, items=[ 0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000, 10000 ]), 'class_weight': CatP(choice, items=[None, 'balanced']), # 'verbose': [False], 'max_iter': FixedP(1000000), 'decision_function_shape': CatP(choice, items=['ovr', 'ovo']) }, children=[kernel_linear, kernel_nonlinear]) return TransformerCS(nodes=[top])
def __new__(cls, *args, fields=None, engine="dump", db='/tmp/cururu', settings=None, blocking=False, seed=0, transformers=None): """Shortcut to create a ConfigSpace.""" if transformers is None: transformers = args if all([isinstance(t, Transformer) for t in transformers]): return object.__new__(cls) node = Node( params={ 'fields': FixedP(fields), 'engine': FixedP(engine), 'db': FixedP(db), 'settings': FixedP(settings), 'blocking': FixedP(blocking), 'seed': FixedP(seed), }) return ContainerCS(Cache.name, Cache.path, transformers, nodes=[node])
def _cs_impl(cls): # TODO complete CS for split; useless? params = {'partitions': IntP(uniform, low=2, high=10)} return TransformerCS(Node(params=params))
def _cs_impl(cls): params = {'feature_range': CatP(choice, items=[(-1, 1), (0, 1)])} return TransformerCS(nodes=[Node(params=params)])
def _cs_impl(cls, data=None): params = { 'sampling_strategy': CatP(choice, items=['not minority', 'not majority', 'all']) } return TransformerCS(Node(params=params))
def _cs_impl(cls): params = { 'distribution': CatP(choice, items=['gaussian', 'bernoulli']) } return TransformerCS(nodes=[Node(params=params)])
def _cs_impl(cls): params = { 'engine': CatP(choice, items=['dump', 'mysql', 'sqlite']), 'settings': FixedP({}) } return TransformerCS(Node(params=params))
def _cs_impl(cls): params = {"path": FixedP("./"), "name": FixedP("iris.arff")} return CS(nodes=[Node(params)])
def _cs_impl(cls): params = {'name': FixedP('iris_OFÆdñO')} return TransformerCS(nodes=[Node(params=params)])
def _cs_impl(cls): params = {'path': FixedP('./'), 'name': FixedP('iris.arff')} return TransformerCS(Node(params=params))
def _cs_impl(cls): # TODO: Implement this cs params = {} return CS(nodes=[Node(params=params)])
def _cs_impl(cls): params = { 'function': CatP(choice, items=cls.function_from_name.keys()), 'field': CatP(choice, items=['z', 'r', 's']) } return TransformerCS(Node(params))
def _cs_impl(cls, data=None): params = { 'operation': CatP(choice, items=['full', 'translate', 'scale']) } return TransformerCS(nodes=[Node(params=params)])