class_docstr: Gaussian Process expected improvement acquisition function.
  
  Computes the analytic sequential expected improvement for a Gaussian process
  model.
  
  Requires that `predictive_distribution` has a `mean`, `stddev` method.
  
  #### Examples
  
  Build and evaluate a Gausian Process Expected Improvement acquisition
  function.
  
  ```python
  import numpy as np
  import tensorflow_probability as tfp
  
  tfd = tfp.distributions
  tfpk = tfp.math.psd_kernels
  tfp_acq = tfp.experimental.bayesopt.acquisition
  
  # Sample 10 20-dimensional index points and associated observations.
  index_points = np.random.uniform(size=[10, 20])
  observations = np.random.uniform(size=[10])
  
  # Build a Gaussian Process regression model over the function values at
  # `predictive_index_points` conditioned on observations.
  predictive_index_points = np.random.uniform(size=[8, 20])
  dist = tfd.GaussianProcessRegressionModel(
      kernel=tfpk.MaternFiveHalves(),
      observation_index_points=index_points,
      observations=observations,
      predictive_index_points=predictive_index_points)
  
  # Define a GP Expected Improvement acquisition function.
  gp_ei = tfp_acq.GaussianProcessExpectedImprovement(
      predictive_distribution=dist,
      observations=observations)
  
  # Evaluate the acquisition function at `predictive_index_points`.
  acq_fn_vals = gp_ei()
  
  # Evaluate the acquisition function at a new set of predictive index points.
  pred_index_points = np.random.uniform(size=[6, 20])
  acq_fn_vals = gp_ei(pred_index_points)
  ```
class_docstr_tok: ["Gaussian","Process","expected","improvement","acquisition","function",".","Computes","the","analytic","sequential","expected","improvement","for","a","Gaussian","process","model",".","Requires","that","`","predictive_distribution","`","has","a","`","mean","`",",","`","stddev","`","method",".","#","#","#","#","Examples","Build","and","evaluate","a","Gausian","Process","Expected","Improvement","acquisition","function",".","``","`","python","import","numpy","as","np","import","tensorflow_probability","as","tfp","tfd","=","tfp.distributions","tfpk","=","tfp.math.psd_kernels","tfp_acq","=","tfp.experimental.bayesopt.acquisition","#","Sample","10","20-dimensional","index","points","and","associated","observations",".","index_points","=","np.random.uniform","(","size=","[","10",",","20","]",")","observations","=","np.random.uniform","(","size=","[","10","]",")","#","Build","a","Gaussian","Process","regression","model","over","the","function","values","at","#","`","predictive_index_points","`","conditioned","on","observations",".","predictive_index_points","=","np.random.uniform","(","size=","[","8",",","20","]",")","dist","=","tfd.GaussianProcessRegressionModel","(","kernel=tfpk.MaternFiveHalves","(",")",",","observation_index_points=index_points",",","observations=observations",",","predictive_index_points=predictive_index_points",")","#","Define","a","GP","Expected","Improvement","acquisition","function",".","gp_ei","=","tfp_acq.GaussianProcessExpectedImprovement","(","predictive_distribution=dist",",","observations=observations",")","#","Evaluate","the","acquisition","function","at","`","predictive_index_points","`",".","acq_fn_vals","=","gp_ei","(",")","#","Evaluate","the","acquisition","function","at","a","new","set","of","predictive","index","points",".","pred_index_points","=","np.random.uniform","(","size=","[","6",",","20","]",")","acq_fn_vals","=","gp_ei","(","pred_index_points",")","``","`"]
docstr: Computes analytic GP expected improvement.
  
  Args:
    **kwargs: Keyword args passed on to the `mean` and `stddev` methods of
      `predictive_distribution`.
  
  Returns:
    Expected improvements at index points implied by `predictive_distribution`
    (or overridden in `**kwargs`).
docstr_tok: ["Computes","analytic","GP","expected","improvement",".","Args",":","*","*","kwargs",":","Keyword","args","passed","on","to","the","`","mean","`","and","`","stddev","`","methods","of","`","predictive_distribution","`",".","Returns",":","Expected","improvements","at","index","points","implied","by","`","predictive_distribution","`","(","or","overridden","in","`","*","*","kwargs","`",")","."]
code: def __call__(self, **kwargs):
      """Computes analytic GP expected improvement.
  
      Args:
        **kwargs: Keyword args passed on to the `mean` and `stddev` methods of
          `predictive_distribution`.
  
      Returns:
        Expected improvements at index points implied by `predictive_distribution`
        (or overridden in `**kwargs`).
      """
      mean = self.predictive_distribution.mean(**kwargs)
      stddev = self.predictive_distribution.stddev(**kwargs)
      best_observed = tf.reduce_max(self.observations, axis=-1)
      return normal_expected_improvement(
          best_observed, mean, stddev, exploration=self.exploration
      )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import student_t
  from tensorflow_probability.python.experimental.bayesopt.acquisition import acquisition_function
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import samplers
label_desc: Use image node_id 3 for calling the GaussianProcessExpectedImprovement obj's underlying member method code with example usage: obj.__call__() and returns: normal_expected_improvement