class_docstr: Analytical Gaussian Process upper confidence bound acquisition function.
  
  Computes the analytic sequential upper confidence bound for a Gaussian
  process model.
  
  Requires that `predictive_distribution` has a `.mean`, `stddev` method.
  
  #### Examples
  
  Build and evaluate a GP Upper Confidence Bound 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 12 5-dimensional index points and associated observations.
  index_points = np.random.uniform(size=[12, 5])
  observations = np.random.uniform(size=[12])
  
  # Build a GP regression model conditioned on observed data.
  dist = tfd.GaussianProcessRegressionModel(
      kernel=tfpk.ExponentiatedQuadratic(),
      observation_index_points=index_points,
      observations=observations)
  
  # Build a GP upper confidence bound acquisition function.
  gp_ucb = tfp_acq.GausianProcessUpperConfidenceBound(
      predictive_distribution=dist,
      observations=observations,
      exploration=0.05,
      num_samples=int(2e4))
  
  # Evaluate the acquisition function at a set of 6 predictive index points.
  pred_index_points = np.random.uniform(size=[6, 5])
  acq_fn_vals = gp_ucb(pred_index_points)  # Has shape [6].
  ```
class_docstr_tok: ["Analytical","Gaussian","Process","upper","confidence","bound","acquisition","function",".","Computes","the","analytic","sequential","upper","confidence","bound","for","a","Gaussian","process","model",".","Requires","that","`","predictive_distribution","`","has","a","`",".mean","`",",","`","stddev","`","method",".","#","#","#","#","Examples","Build","and","evaluate","a","GP","Upper","Confidence","Bound","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","12","5-dimensional","index","points","and","associated","observations",".","index_points","=","np.random.uniform","(","size=","[","12",",","5","]",")","observations","=","np.random.uniform","(","size=","[","12","]",")","#","Build","a","GP","regression","model","conditioned","on","observed","data",".","dist","=","tfd.GaussianProcessRegressionModel","(","kernel=tfpk.ExponentiatedQuadratic","(",")",",","observation_index_points=index_points",",","observations=observations",")","#","Build","a","GP","upper","confidence","bound","acquisition","function",".","gp_ucb","=","tfp_acq.GausianProcessUpperConfidenceBound","(","predictive_distribution=dist",",","observations=observations",",","exploration=0.05",",","num_samples=int","(","2e4",")",")","#","Evaluate","the","acquisition","function","at","a","set","of","6","predictive","index","points",".","pred_index_points","=","np.random.uniform","(","size=","[","6",",","5","]",")","acq_fn_vals","=","gp_ucb","(","pred_index_points",")","#","Has","shape","[","6","]",".","``","`"]
docstr: Computes analytic GP upper confidence bound.
  
  Args:
    **kwargs: Keyword args passed on to the `mean` and `stddev` methods of
      `predictive_distribution`.
  
  Returns:
    Upper confidence bound at index points implied by
    `predictive_distribution` (or overridden in `**kwargs`).
docstr_tok: ["Computes","analytic","GP","upper","confidence","bound",".","Args",":","*","*","kwargs",":","Keyword","args","passed","on","to","the","`","mean","`","and","`","stddev","`","methods","of","`","predictive_distribution","`",".","Returns",":","Upper","confidence","bound","at","index","points","implied","by","`","predictive_distribution","`","(","or","overridden","in","`","*","*","kwargs","`",")","."]
code: def __call__(self, **kwargs):
      """Computes analytic GP upper confidence bound.
  
      Args:
        **kwargs: Keyword args passed on to the `mean` and `stddev` methods of
          `predictive_distribution`.
  
      Returns:
        Upper confidence bound at index points implied by
        `predictive_distribution` (or overridden in `**kwargs`).
      """
      stddev = self.predictive_distribution.stddev(**kwargs)
      mean = self.predictive_distribution.mean(**kwargs)
      return normal_upper_confidence_bound(
          mean, stddev, exploration=self.exploration
      )
  
file_path: probability/tensorflow_probability/python/experimental/bayesopt/acquisition/upper_confidence_bound.py
imports: import tensorflow.compat.v2
  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 GaussianProcessUpperConfidenceBound obj's underlying member method code with example usage: obj.__call__() and returns: normal_upper_confidence_bound