Beispiel #1
0
def get_rf(n_dimensions, rs):
    bounds = [(0., 1.) for _ in range(n_dimensions)]
    types = np.zeros(n_dimensions)

    configspace = smac.configspace.ConfigurationSpace()
    for i in range(n_dimensions):
        configspace.add_hyperparameter(
            smac.configspace.UniformFloatHyperparameter('x%d' % i, 0, 1))

    model = RandomForestWithInstancesHPO(
        configspace=configspace,
        types=types,
        bounds=bounds,
        log_y=False,
        bootstrap=False,
        n_iters=5,
        n_splits=5,
        seed=1,
    )
    return model
Beispiel #2
0
 def _get_cs(self, n_dimensions):
     configspace = smac.configspace.ConfigurationSpace()
     for i in range(n_dimensions):
         configspace.add_hyperparameter(
             smac.configspace.UniformFloatHyperparameter('x%d' % i, 0, 1))
     return configspace