code: def _compute_acq(self, x):
      # Naming of local variables here follows that in the paper
  
      if x.shape[1] != self.input_dim:
          message = "Dimensionality mismatch: x should be of size {}, but is of size {}".format(
              self.input_dim, x.shape[1]
          )
          raise ValueError(message)
  
      if not self._required_parameters_initialized():
          self._update_parameters()
  
      if x.shape[0] > 1:
          results = np.zeros([x.shape[0], 1])
          for j in range(x.shape[0]):
              results[j] = self._compute_acq(x[[j], :])
          return results
  
      # Number of belief locations
      N = self.logP.size
  
      # Evaluate innovation, these are gradients of mean and variance of the repr points wrt x
      # see method for more details
      dMdx, dVdx = self._innovations(x)
  
      # The transpose operator is there to make the array indexing equivalent to matlab's
      dVdx = dVdx[np.triu(np.ones((N, N))).T.astype(bool), np.newaxis]
  
      dMdx_squared = dMdx.dot(dMdx.T)
      trace_term = np.sum(
          np.sum(
              np.multiply(
                  self.dlogPdMudMu,
                  np.reshape(
                      dMdx_squared,
                      (1, dMdx_squared.shape[0], dMdx_squared.shape[1]),
                  ),
              ),
              2,
          ),
          1,
      )[:, np.newaxis]
  
      # Deterministic part of change:
      deterministic_change = (
          self.dlogPdSigma.dot(dVdx) + 0.5 * trace_term
      )
      # Stochastic part of change:
      stochastic_change = (self.dlogPdMu.dot(dMdx)).dot(self.W)
      # Predicted new logP:
      predicted_logP = np.add(
          self.logP + deterministic_change, stochastic_change
      )
      max_predicted_logP = np.amax(predicted_logP, axis=0)
  
      # normalize predictions
      max_diff = max_predicted_logP + np.log(
          np.sum(np.exp(predicted_logP - max_predicted_logP), axis=0)
      )
      lselP = (
          max_predicted_logP if np.any(np.isinf(max_diff)) else max_diff
      )
      predicted_logP = np.subtract(predicted_logP, lselP)
  
      # We maximize the information gain
      dHp = np.sum(
          np.multiply(
              np.exp(predicted_logP),
              np.add(predicted_logP, self.repr_points_log),
          ),
          axis=0,
      )
  
      dH = np.mean(dHp)
      return dH
  
file_path: GPyOpt/GPyOpt/acquisitions/ES.py
imports: import scipy
  import numpy
  from .base import AcquisitionBase
  from .EI import AcquisitionEI
  from ..util import epmgp
  from ..models.gpmodel import GPModel
label_desc: Use image node_id 5 for calling the AcquisitionEntropySearch obj's underlying member method code with example usage: obj._compute_acq(x) and returns: dH, results