Esempio n. 1
0
        def adaptation_blackbox_optimizer_fn(metaparams):
            if config.adaptation_string == "MC":
                return blackbox_optimization_algorithms.MCBlackboxOptimizer(
                    config.adaptation_precision_parameter,
                    config.adaptation_est_type,
                    config.fvalues_normalization,
                    config.hyperparameters_update_method,
                    metaparams,
                    config.alpha,
                    num_top_directions=0)
            elif config.adaptation_string == "SKLRegression":
                return blackbox_optimization_algorithms.SklearnRegressionBlackboxOptimizer(
                    "lasso", config.regularizer, config.est_type,
                    config.fvalues_normalization,
                    config.hyperparameters_update_method, metaparams,
                    config.alpha)

            elif config.adaptation_string == "GeneralRegression":
                return blackbox_optimization_algorithms.GeneralRegressionBlackboxOptimizer(
                    regression_method=getattr(
                        regression_optimizers,
                        config.regression_optimizer_string),
                    regularizer=config.regularizer,
                    est_type=config.adaptation_est_type,
                    normalize_fvalues=config.fvalues_normalization,
                    hyperparameters_update_method=config.
                    hyperparameters_update_method,
                    extra_params=metaparams,
                    step_size=config.alpha)
Esempio n. 2
0
 def es_blackbox_optimizer_fn(metaparams):
     return blackbox_optimization_algorithms.MCBlackboxOptimizer(
         config.es_precision_parameter,
         config.es_est_type,
         config.fvalues_normalization,
         config.hyperparameters_update_method,
         metaparams,
         config.es_step_size,
         num_top_directions=0)