(self, X_test, derivative=False, **kwargs)
Computes the information gain of X and its derivatives

        Parameters
        ----------
        X_test: np.ndarray(N, D), The input point where the acquisition_functions function
            should be evaluate.

        derivative: Boolean
            If is set to true also the derivative of the acquisition_functions
            function at X is returned
            Not tested!

        Returns
        -------
        np.ndarray(N,)
            Relative change of entropy of pmin
        np.ndarray(N,D)
            Derivatives with respect to X
            (only if derivative=True)
Computes the information gain of X and its derivatives
Computes the information gain of X and its derivatives
def compute(self, X_test, derivative=False, **kwargs):
        """
        Computes the information gain of X and its derivatives

        Parameters
        ----------
        X_test: np.ndarray(N, D), The input point where the acquisition_functions function
            should be evaluate.

        derivative: Boolean
            If is set to true also the derivative of the acquisition_functions
            function at X is returned
            Not tested!

        Returns
        -------
        np.ndarray(N,)
            Relative change of entropy of pmin
        np.ndarray(N,D)
            Derivatives with respect to X
            (only if derivative=True)
        """

        acq = np.zeros([X_test.shape[0]])
        grad = np.zeros([X_test.shape[0], X_test.shape[1]])
        for i, X in enumerate(X_test):
            if derivative:
                acq[i], grad[i] = self.dh_fun(X[None, :], derivative=True)

            else:
                acq[i] = self.dh_fun(X[None, :], derivative=False)

            if np.any(np.isnan(acq[i])) or np.any(acq[i] == np.inf):
                acq[i] = -sys.float_info.max

        if derivative:
            return acq, grad
        else:
            return acq
def compute ( self , X_test , derivative = False , * * kwargs ) : acq = np . zeros ( [ X_test . shape [ 0 ] ] ) grad = np . zeros ( [ X_test . shape [ 0 ] , X_test . shape [ 1 ] ] ) for i , X in enumerate ( X_test ) : if derivative : acq [ i ] , grad [ i ] = self . dh_fun ( X [ None , : ] , derivative = True ) else : acq [ i ] = self . dh_fun ( X [ None , : ] , derivative = False ) if np . any ( np . isnan ( acq [ i ] ) ) or np . any ( acq [ i ] == np . inf ) : acq [ i ] = - sys . float_info . max if derivative : return acq , grad else : return acq