code: def UCB(m, m1, x, fixed, kappa=0.5):
      """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 * np.log(c2 * m.X.shape[0])
      kappa = np.sqrt(beta_t)
  
      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: orion/src/orion/algo/pbt/pb2_utils.py
imports: from copy import deepcopy
  import numpy
  from scipy.optimize import minimize
  from sklearn.metrics import euclidean_distances, pairwise_distances
  from orion.core.utils.module_import import ImportOptional
label_desc: Use image node_id 3 for calling a global function with example usage: UCB(m, m1, x, fixed, kappa) and returns: unknown