class_docstr: Gaussian Process probability of improvement acquisition function.
  
  Computes the analytic sequential probability of improvement for a Gaussian
  process model relative to observed data.
  
  Requires that `predictive_distribution` has `mean` and `stddev` methods.
  
  #### Examples
  
  Build and evaluate a GP Probability of 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 4-dimensional index points and associated observations.
  index_points = np.random.uniform(size=[10, 4])
  observations = np.random.uniform(size=[10])
  
  # Build a GP regression model.
  dist = tfd.GaussianProcessRegressionModel(
      kernel=tfpk.ExponentiatedQuadratic(),
      observation_index_points=index_points,
      observations=observations)
  
  gp_poi = tfp_acq.GaussianProcessProbabilityOfImprovement(
      predictive_distribution=dist,
      observations=observations)
  
  # Evaluate the acquisition function at a set of predictive index points.
  pred_index_points = np.random.uniform(size=[6, 4])
  acq_fn_vals = gp_poi(pred_index_points)  # Has shape [6].
  ```
class_docstr_tok: ["Gaussian","Process","probability","of","improvement","acquisition","function",".","Computes","the","analytic","sequential","probability","of","improvement","for","a","Gaussian","process","model","relative","to","observed","data",".","Requires","that","`","predictive_distribution","`","has","`","mean","`","and","`","stddev","`","methods",".","#","#","#","#","Examples","Build","and","evaluate","a","GP","Probability","of","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","4-dimensional","index","points","and","associated","observations",".","index_points","=","np.random.uniform","(","size=","[","10",",","4","]",")","observations","=","np.random.uniform","(","size=","[","10","]",")","#","Build","a","GP","regression","model",".","dist","=","tfd.GaussianProcessRegressionModel","(","kernel=tfpk.ExponentiatedQuadratic","(",")",",","observation_index_points=index_points",",","observations=observations",")","gp_poi","=","tfp_acq.GaussianProcessProbabilityOfImprovement","(","predictive_distribution=dist",",","observations=observations",")","#","Evaluate","the","acquisition","function","at","a","set","of","predictive","index","points",".","pred_index_points","=","np.random.uniform","(","size=","[","6",",","4","]",")","acq_fn_vals","=","gp_poi","(","pred_index_points",")","#","Has","shape","[","6","]",".","``","`"]
docstr: Constructs a Probability of Improvement acquisition function.
  
  Args:
    predictive_distribution: `tfd.Distribution`-like, the distribution over
      observations at a set of index points. Must have `mean`, `stddev`
      methods.
    observations: `Float` `Tensor` of observations. Shape has the form
      `[b1, ..., bB, e]`, where `e` is the number of index points (such that
      the event shape of `predictive_distribution` is `[e]`) and
      `[b1, ..., bB]` is broadcastable with the batch shape of
      `predictive_distribution`.
    seed: PRNG seed; see tfp.random.sanitize_seed for details.
docstr_tok: ["Constructs","a","Probability","of","Improvement","acquisition","function",".","Args",":","predictive_distribution",":","`","tfd.Distribution","`","-like",",","the","distribution","over","observations","at","a","set","of","index","points",".","Must","have","`","mean","`",",","`","stddev","`","methods",".","observations",":","`","Float","`","`","Tensor","`","of","observations",".","Shape","has","the","form","`","[","b1",",","...",",","bB",",","e","]","`",",","where","`","e","`","is","the","number","of","index","points","(","such","that","the","event","shape","of","`","predictive_distribution","`","is","`","[","e","]","`",")","and","`","[","b1",",","...",",","bB","]","`","is","broadcastable","with","the","batch","shape","of","`","predictive_distribution","`",".","seed",":","PRNG","seed",";","see","tfp.random.sanitize_seed","for","details","."]
code: def __init__(self, predictive_distribution, observations, seed=None):
      """Constructs a Probability of Improvement acquisition function.
  
      Args:
        predictive_distribution: `tfd.Distribution`-like, the distribution over
          observations at a set of index points. Must have `mean`, `stddev`
          methods.
        observations: `Float` `Tensor` of observations. Shape has the form
          `[b1, ..., bB, e]`, where `e` is the number of index points (such that
          the event shape of `predictive_distribution` is `[e]`) and
          `[b1, ..., bB]` is broadcastable with the batch shape of
          `predictive_distribution`.
        seed: PRNG seed; see tfp.random.sanitize_seed for details.
      """
      super(GaussianProcessProbabilityOfImprovement, self).__init__(
          predictive_distribution=predictive_distribution,
          observations=observations,
          seed=seed,
      )
  
file_path: probability/tensorflow_probability/python/experimental/bayesopt/acquisition/probability_of_improvement.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import normal
  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 1 to create a new GaussianProcessProbabilityOfImprovement object from inherited base classes: acquisition_function with example: obj = GaussianProcessProbabilityOfImprovement(predictive_distribution, observations, seed)