code: def _compute_acq_withGradients(self, x):
          
          means, stds, dmdxs, dsdxs = self.model.predict_withGradients(x)
          fmins = self.model.get_fmin()
          f_acqu = None
          df_acqu = None
          for m, s, fmin, dmdx, dsdx in zip(means, stds, fmins, dmdxs, dsdxs):
              phi, Phi, u = get_quantiles(self.jitter, fmin, m, s)
              f = Phi
              df = -(phi/s)* (dmdx + dsdx * u)
              if f_acqu is None:
                  f_acqu = f
                  df_acqu = df
              else:
                  f_acqu += f
                  df_acqu += df
          return f_acqu/(len(means)), df_acqu/(len(means))
docs: Integrated Expected Improvement and its derivative