(self)
return np.clip(cand[best], self.lower, self.upper)
Maximizes the given acquisition function.

        Returns
        -------
        np.ndarray(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(D,)
            Point with highest acquisition value.
        """
        cand = []
        cand_vals = []

        f = partial(self._acquisition_fkt_wrapper, acq_f=self.objective_func)

        starts = init_random_uniform(self.lower, self.upper, int(self.n_restarts * 0.5))
        rand_incs = np.array([np.random.normal(loc=self.objective_func.model.get_incumbent()[0],
                                               scale=np.ones([self.lower.shape[0]]) * 0.5)
                              for _ in range(int(self.n_restarts * 0.5))])
        starts = np.append(starts, rand_incs, axis=0)

        for start in starts:

           res = optimize.minimize(f, start, method='L-BFGS-B',
                                   bounds=list(zip(self.lower, self.upper)),
                                   options={"disp": self.verbosity})

           cand.append(res["x"])
           cand_vals.append(res["fun"])

        best = np.argmin(cand_vals)

        return np.clip(cand[best], self.lower, self.upper)
def maximize ( self ) : cand = [ ] cand_vals = [ ] f = partial ( self . _acquisition_fkt_wrapper , acq_f = self . objective_func ) starts = init_random_uniform ( self . lower , self . upper , int ( self . n_restarts * 0.5 ) ) rand_incs = np . array ( [ np . random . normal ( loc = self . objective_func . model . get_incumbent ( ) [ 0 ] , scale = np . ones ( [ self . lower . shape [ 0 ] ] ) * 0.5 ) for _ in range ( int ( self . n_restarts * 0.5 ) ) ] ) starts = np . append ( starts , rand_incs , axis = 0 ) for start in starts : res = optimize . minimize ( f , start , method = 'L-BFGS-B' , bounds = list ( zip ( self . lower , self . upper ) ) , options = { "disp" : self . verbosity } ) cand . append ( res [ "x" ] ) cand_vals . append ( res [ "fun" ] ) best = np . argmin ( cand_vals ) return np . clip ( cand [ best ] , self . lower , self . upper )