Ejemplo n.º 1
0
    def run_bohamiann(self, iterations=20):
        cs = self.__class__.get_configspace()
        
        lower, upper = get_upper_lower(cs)

        results = bohamiann(self.compute, lower, upper, num_iterations=iterations, cs=cs)
        
        x_best = results["x_opt"]
        config = get_config_dictionary(x_best, cs)
        print(config)
Ejemplo n.º 2
0
 def run_es(self, iterations=20):
     cs = self.__class__.get_configspace()
     
     lower, upper = get_upper_lower(cs)
     if not os.path.exists(self.run_dir):
         os.mkdir(self.run_dir)
     log_dir = os.path.join(self.run_dir, f'EXP{self.experiment_no}')
     if not os.path.exists(log_dir):
         os.mkdir(log_dir)
     
     results = entropy_search(self.compute, lower, upper, num_iterations=iterations, cs=cs, min_budget=self.min_budget, max_budget=self.max_budget)
     save_results_optimisation(results, log_dir)
     x_best = results["x_opt"]
     self.experiment_no += 1
     print(x_best)
Ejemplo n.º 3
0
    def run_es(self, iterations=20):
        cs = self.__class__.get_configspace()
        lower, upper = get_upper_lower(cs)

        results = entropy_search(self.compute,
                                 lower,
                                 upper,
                                 num_iterations=iterations,
                                 cs=cs,
                                 min_budget=2,
                                 max_budget=5)
        x_best = results["x_opt"]

        config = get_config_dictionary(x_best, cs)
        print(config)
Ejemplo n.º 4
0
    def run_bohamiann(self, iterations=20):
        cs = self.__class__.get_configspace()

        lower, upper = get_upper_lower(cs)

        results = bohamiann(self.compute,
                            lower,
                            upper,
                            num_iterations=iterations,
                            cs=cs)

        if not os.path.exists(self.run_dir):
            os.mkdir(self.run_dir)
        log_dir = os.path.join(self.run_dir, f'EXP{self.experiment_no}')
        if not os.path.exists(log_dir):
            os.mkdir(log_dir)
        save_results_optimisation(results, log_dir)
        x_best = results["x_opt"]
        self.experiment_no += 1
        print('Best run', x_best)
        return x_best