parameters: (self, mu_star, var_star, grad_mu, grad_chol_decomp)
return_statement: return numpy.atleast_2d(d_a)
docstring: r"""Compute the gradient of EI when the number of potential samples is 1 (i.e., points_being_sampled.size = 0) using *fast* analytic methods.
  
          This function can only support the computation of 1,0-EI. In this case, we have analytic formulas
          for computing EI and its gradient.
  
          Thus this function does not perform any explicit numerical integration, nor does it require access to a
          random number generator.
  
          See Ginsbourger, Le Riche, and Carraro.
  
          :param mu_star: the mean of the GP evaluated at points_to_sample
          :type mu_star: float64
          :param var_star: the variance of the GP evaluated at points_to_sample
          :type var_star: float64
          :param grad_mu: the gradient of the mean of the GP evaluated at points_to_sample, wrt points_to_sample
          :type grad_mu: array of float64 with shape (self.dim)
          :param grad_chol_decomp: the gradient of the variance of the GP evaluated at points_to_sample, wrt points_to_sample
          :type grad_chol_decomp: array of float64 with shape (self.dim)
          :return: gradient of EI, ``\pderiv{EI(x)}{x_d}``, where ``x`` is ``points_to_sample``
          :rtype: array of float64 with shape (self.dim)
docstring_summary: r"""Compute the gradient of EI when the number of potential samples is 1 (i.e., points_being_sampled.size = 0) using *fast* analytic methods.
docstring_tokens: r Compute the gradient of EI when the number of potential samples is 1 ( i . e . points_being_sampled . size = 0 ) using * fast * analytic methods .
function: def _compute_grad_expected_improvement_1d_analytic(self, mu_star, var_star, grad_mu, grad_chol_decomp):
          r"""Compute the gradient of EI when the number of potential samples is 1 (i.e., points_being_sampled.size = 0) using *fast* analytic methods.
  
          This function can only support the computation of 1,0-EI. In this case, we have analytic formulas
          for computing EI and its gradient.
  
          Thus this function does not perform any explicit numerical integration, nor does it require access to a
          random number generator.
  
          See Ginsbourger, Le Riche, and Carraro.
  
          :param mu_star: the mean of the GP evaluated at points_to_sample
          :type mu_star: float64
          :param var_star: the variance of the GP evaluated at points_to_sample
          :type var_star: float64
          :param grad_mu: the gradient of the mean of the GP evaluated at points_to_sample, wrt points_to_sample
          :type grad_mu: array of float64 with shape (self.dim)
          :param grad_chol_decomp: the gradient of the variance of the GP evaluated at points_to_sample, wrt points_to_sample
          :type grad_chol_decomp: array of float64 with shape (self.dim)
          :return: gradient of EI, ``\pderiv{EI(x)}{x_d}``, where ``x`` is ``points_to_sample``
          :rtype: array of float64 with shape (self.dim)
  
          """
          sigma_star = numpy.sqrt(var_star)
          mu_diff = self._best_so_far - mu_star
          c = mu_diff / sigma_star
          pdf_c = scipy.stats.norm.pdf(c)
          cdf_c = scipy.stats.norm.cdf(c)
  
          d_c = (-sigma_star * grad_mu - grad_chol_decomp * mu_diff) / var_star
          d_a = -grad_mu * cdf_c + mu_diff * pdf_c * d_c
          d_b = grad_chol_decomp * pdf_c - sigma_star * c * pdf_c * d_c
  
          d_a += d_b
          return numpy.atleast_2d(d_a)
function_tokens: def _compute_grad_expected_improvement_1d_analytic ( self , mu_star , var_star , grad_mu , grad_chol_decomp ) : sigma_star = numpy . sqrt ( var_star ) mu_diff = self . _best_so_far - mu_star c = mu_diff / sigma_star pdf_c = scipy . stats . norm . pdf ( c ) cdf_c = scipy . stats . norm . cdf ( c ) d_c = ( - sigma_star * grad_mu - grad_chol_decomp * mu_diff ) / var_star d_a = - grad_mu * cdf_c + mu_diff * pdf_c * d_c d_b = grad_chol_decomp * pdf_c - sigma_star * c * pdf_c * d_c d_a += d_b return numpy . atleast_2d ( d_a )