code: def UCB(m, m1, x, fixed, kappa=None):
      """UCB acquisition function. Interesting points to note:
      1) We concat with the fixed points, because we are not optimizing wrt
         these. This is the Reward and Time, which we can't change. We want
         to find the best hyperparameters *given* the reward and time.
      2) We use m to get the mean and m1 to get the variance. If we already
         have trials running, then m1 contains this information. This reduces
         the variance at points currently running, even if we don't have
         their label.
         Ref: https://jmlr.org/papers/volume15/desautels14a/desautels14a.pdf
  
      """
  
      c1 = 0.2
      c2 = 0.4
      beta_t = c1 + max(0, np.log(c2 * m.X.shape[0]))
      kappa = np.sqrt(beta_t) if kappa is None else kappa
  
      xtest = np.concatenate(
          (fixed.reshape(-1, 1), np.array(x).reshape(-1, 1))
      ).T
  
      try:
          preds = m.predict(xtest)
          preds = m.predict(xtest)
          mean = preds[0][0][0]
      except ValueError:
          mean = -9999
  
      try:
          preds = m1.predict(xtest)
          var = preds[1][0][0]
      except ValueError:
          var = 0
      return mean + kappa * var
  
file_path: ray/python/ray/tune/schedulers/pb2_utils.py
imports: import numpy
  from scipy.optimize import minimize
  import GPy
  from GPy.kern import Kern
  from GPy.core import Param
  from sklearn.metrics import pairwise_distances
  from sklearn.metrics.pairwise import euclidean_distances
label_desc: Use image node_id 3 for calling a global function with example usage: UCB(m, m1, x, fixed, kappa) and returns: unknown