(self, X_test, derivative=False)
Computes the PI value and its derivatives.

        Parameters
        ----------
        X_test: np.ndarray(1, D), The input point where the acquisition_functions function
            should be evaluate. The dimensionality of X is (N, D), with N as
            the number of points to evaluate at and D is the number of
            dimensions of one X.

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

        Returns
        -------
        np.ndarray(1,1)
            Probability of Improvement of X_test
        np.ndarray(1,D)
            Derivative of Probability of Improvement at X_test
            (only if derivative=True)
Computes the PI value and its derivatives.
Computes the PI value and its derivatives .
def compute(self, X_test, derivative=False):
        """
        Computes the PI value and its derivatives.

        Parameters
        ----------
        X_test: np.ndarray(1, D), The input point where the acquisition_functions function
            should be evaluate. The dimensionality of X is (N, D), with N as
            the number of points to evaluate at and D is the number of
            dimensions of one X.

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

        Returns
        -------
        np.ndarray(1,1)
            Probability of Improvement of X_test
        np.ndarray(1,D)
            Derivative of Probability of Improvement at X_test
            (only if derivative=True)
        """

        m, v = self.model.predict(X_test)
        _, inc_val = self.model.get_incumbent()

        s = np.sqrt(v)
        z = (inc_val - m - self.par) / s
        f = norm.cdf(z)

        if derivative:
            dmdx, ds2dx = self.model.predictive_gradients(X_test)
            dmdx = dmdx[0]
            ds2dx = ds2dx[0][:, None]
            dsdx = ds2dx / (2 * s)
            df = ((-norm.pdf(z) / s) * (dmdx + dsdx * z)).T
            return f, df
        else:
            return f
def compute ( self , X_test , derivative = False ) : m , v = self . model . predict ( X_test ) _ , inc_val = self . model . get_incumbent ( ) s = np . sqrt ( v ) z = ( inc_val - m - self . par ) / s f = norm . cdf ( z ) if derivative : dmdx , ds2dx = self . model . predictive_gradients ( X_test ) dmdx = dmdx [ 0 ] ds2dx = ds2dx [ 0 ] [ : , None ] dsdx = ds2dx / ( 2 * s ) df = ( ( - norm . pdf ( z ) / s ) * ( dmdx + dsdx * z ) ) . T return f , df else : return f