(self, X, derivative=False)
Computes the acquisition_functions value for a single point.

        Parameters
        ----------
        X : (1, D) numpy array
            The input point for which the acquisition_functions functions is computed.
        derivative : bool, optional
            If it is equal to True also the derivatives with respect to X is
            computed.

        Returns
        -------
        acquisition_value: numpy array
            The acquisition_functions value computed for X.
        grad : numpy array
            The computed gradient of the acquisition_functions function at X. Only
            returned if derivative==True
Computes the acquisition_functions value for a single point.
Computes the acquisition_functions value for a single point .
def compute(self, X, derivative=False):
        """
        Computes the acquisition_functions value for a single point.

        Parameters
        ----------
        X : (1, D) numpy array
            The input point for which the acquisition_functions functions is computed.
        derivative : bool, optional
            If it is equal to True also the derivatives with respect to X is
            computed.

        Returns
        -------
        acquisition_value: numpy array
            The acquisition_functions value computed for X.
        grad : numpy array
            The computed gradient of the acquisition_functions function at X. Only
            returned if derivative==True
        """
        if len(X.shape) == 1:
            X = X[np.newaxis, :]

        # Predict the log costs for this configuration
        log_cost = self.cost_model.predict(X)[0]

        if derivative:
            raise "Not implemented"
        else:
            dh = super(InformationGainPerUnitCost, self).compute(X,
                                                                 derivative=derivative)
            # We model the log cost, but we compute
            # the information gain per unit cost

            # Add the cost it took to pick the last configuration
            cost = np.exp(log_cost)

            acquisition_value = dh / (cost + self.overhead)

            return acquisition_value
def compute ( self , X , derivative = False ) : if len ( X . shape ) == 1 : X = X [ np . newaxis , : ] # Predict the log costs for this configuration log_cost = self . cost_model . predict ( X ) [ 0 ] if derivative : raise "Not implemented" else : dh = super ( InformationGainPerUnitCost , self ) . compute ( X , derivative = derivative ) # We model the log cost, but we compute # the information gain per unit cost # Add the cost it took to pick the last configuration cost = np . exp ( log_cost ) acquisition_value = dh / ( cost + self . overhead ) return acquisition_value