class_docstr: Max-value entropy search acquisition function.
  
  Computes the sequential max-value entropy search acquisition function.
  
  Requires that `predictive_distribution` has a `.mean`, `stddev` method.
  
  #### Examples
  
  Build and evaluate a Gausian Process Maximum Value Entropy Search 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.
  dist = tfd.GaussianProcessRegressionModel(
      kernel=tfpk.MaternFiveHalves(),
      observation_index_points=index_points,
      observations=observations)
  
  # Define a GP max value entropy search acquisition function.
  gp_mes = tfp_acq.GaussianProcessMaxValueEntropySearch(
      predictive_distribution=dist,
      observations=observations,
      num_max_value_samples=200)
  
  # Evaluate the acquisition function at a set of predictive index points.
  pred_index_points = np.random.uniform(size=[6, 20])
  acq_fn_vals = gp_mes(pred_index_points)
  ```
  
  #### References
  [1] Z. Wang, S. Jegelka. Max-value Entropy Search for Efficient Bayesian
      Optimization. https://arxiv.org/abs/1703.01968
class_docstr_tok: ["Max-value","entropy","search","acquisition","function",".","Computes","the","sequential","max-value","entropy","search","acquisition","function",".","Requires","that","`","predictive_distribution","`","has","a","`",".mean","`",",","`","stddev","`","method",".","#","#","#","#","Examples","Build","and","evaluate","a","Gausian","Process","Maximum","Value","Entropy","Search","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",".","dist","=","tfd.GaussianProcessRegressionModel","(","kernel=tfpk.MaternFiveHalves","(",")",",","observation_index_points=index_points",",","observations=observations",")","#","Define","a","GP","max","value","entropy","search","acquisition","function",".","gp_mes","=","tfp_acq.GaussianProcessMaxValueEntropySearch","(","predictive_distribution=dist",",","observations=observations",",","num_max_value_samples=200",")","#","Evaluate","the","acquisition","function","at","a","set","of","predictive","index","points",".","pred_index_points","=","np.random.uniform","(","size=","[","6",",","20","]",")","acq_fn_vals","=","gp_mes","(","pred_index_points",")","``","`","#","#","#","#","References","[","1","]","Z.","Wang",",","S.","Jegelka",".","Max-value","Entropy","Search","for","Efficient","Bayesian","Optimization",".","https",":","\/\/arxiv.org\/abs\/1703.01968"]
docstr: Constructs a max-value entropy search acquisition function.
  
  Args:
    predictive_distribution: `tfd.Distribution`-like, the distribution over
      observations at a set of index points.
    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.
    num_max_value_samples: The number of samples to use for the max-value
      distribution.
docstr_tok: ["Constructs","a","max-value","entropy","search","acquisition","function",".","Args",":","predictive_distribution",":","`","tfd.Distribution","`","-like",",","the","distribution","over","observations","at","a","set","of","index","points",".","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",".","num_max_value_samples",":","The","number","of","samples","to","use","for","the","max-value","distribution","."]
code: def __init__(
      self,
      predictive_distribution,
      observations,
      seed=None,
      num_max_value_samples=100,
  ):
      """Constructs a max-value entropy search acquisition function.
  
      Args:
        predictive_distribution: `tfd.Distribution`-like, the distribution over
          observations at a set of index points.
        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.
        num_max_value_samples: The number of samples to use for the max-value
          distribution.
      """
      self._num_max_value_samples = num_max_value_samples
      self._precomputed_samples = self._precompute_max_value_samples(
          predictive_distribution,
          observations,
          seed,
          num_max_value_samples,
      )
      super(GaussianProcessMaxValueEntropySearch, self).__init__(
          predictive_distribution=predictive_distribution,
          observations=observations,
          seed=seed,
      )
  
file_path: probability/tensorflow_probability/python/experimental/bayesopt/acquisition/max_value_entropy_search.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import gumbel
  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 prefer_static
  from tensorflow_probability.python.math import root_search
  from tensorflow_probability.python.math import special
  from tensorflow_probability.python.mcmc import sample_halton_sequence_lib
label_desc: Use image node_id 1 to create a new GaussianProcessMaxValueEntropySearch object from inherited base classes: acquisition_function with example: obj = GaussianProcessMaxValueEntropySearch(predictive_distribution, observations, seed, num_max_value_samples)