(self)
return res[0]
Maximizes the given acquisition function.

        Returns
        -------
        np.ndarray(N,D)
            Point with the highest acquisition value.
Maximizes the given acquisition function.
Maximizes the given acquisition function .
def maximize(self):
        """
        Maximizes the given acquisition function.

        Returns
        -------
        np.ndarray(N,D)
            Point with the highest acquisition value.
        """

        verbose_level = -9
        if self.verbose:
            verbose_level = 0

        start_point = init_random_uniform(self.lower, self.upper, 1, self.rng)

        def obj_func(x):
            a = self.objective_func(x[None, :])
            return -a[0]

        res = cma.fmin(obj_func, x0=start_point[0], sigma0=0.6,
                       restarts=self.restarts,
                       options={"bounds": [self.lower, self.upper],
                                "verbose": verbose_level,
                                "verb_log": sys.maxsize,
                                "maxfevals": self.n_func_evals})
        if res[0] is None:
            logging.error("CMA-ES did not find anything. \
                Return random configuration instead.")
            return start_point

        return res[0]
def maximize ( self ) : verbose_level = - 9 if self . verbose : verbose_level = 0 start_point = init_random_uniform ( self . lower , self . upper , 1 , self . rng ) def obj_func ( x ) : a = self . objective_func ( x [ None , : ] ) return - a [ 0 ] res = cma . fmin ( obj_func , x0 = start_point [ 0 ] , sigma0 = 0.6 , restarts = self . restarts , options = { "bounds" : [ self . lower , self . upper ] , "verbose" : verbose_level , "verb_log" : sys . maxsize , "maxfevals" : self . n_func_evals } ) if res [ 0 ] is None : logging . error ( "CMA-ES did not find anything. \
                Return random configuration instead." ) return start_point return res [ 0 ]