(self)
return x
Maximizes the given acquisition function.

        Returns
        -------
        np.ndarray(N,D)
            Point with 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 highest acquisition value.

        """
        if self.verbose:
            x, _, _ = DIRECT.solve(self._direct_acquisition_fkt_wrapper(self.objective_func),
                                   l=[self.lower],
                                   u=[self.upper],
                                   maxT=self.n_iters,
                                   maxf=self.n_func_evals)
        else:
            fileno = sys.stdout.fileno()
            with os.fdopen(os.dup(fileno), 'wb') as stdout:
                with os.fdopen(os.open(os.devnull, os.O_WRONLY), 'wb') as devnull:
                    sys.stdout.flush();
                    os.dup2(devnull.fileno(), fileno)  # redirect
                    x, _, _ = DIRECT.solve(self._direct_acquisition_fkt_wrapper(self.objective_func),
                                           l=[self.lower],
                                           u=[self.upper],
                                           maxT=self.n_iters,
                                           maxf=self.n_func_evals)
                sys.stdout.flush();
                os.dup2(stdout.fileno(), fileno)  # restore
        return x
def maximize ( self ) : if self . verbose : x , _ , _ = DIRECT . solve ( self . _direct_acquisition_fkt_wrapper ( self . objective_func ) , l = [ self . lower ] , u = [ self . upper ] , maxT = self . n_iters , maxf = self . n_func_evals ) else : fileno = sys . stdout . fileno ( ) with os . fdopen ( os . dup ( fileno ) , 'wb' ) as stdout : with os . fdopen ( os . open ( os . devnull , os . O_WRONLY ) , 'wb' ) as devnull : sys . stdout . flush ( ) os . dup2 ( devnull . fileno ( ) , fileno ) # redirect x , _ , _ = DIRECT . solve ( self . _direct_acquisition_fkt_wrapper ( self . objective_func ) , l = [ self . lower ] , u = [ self . upper ] , maxT = self . n_iters , maxf = self . n_func_evals ) sys . stdout . flush ( ) os . dup2 ( stdout . fileno ( ) , fileno ) # restore return x