class_docstr: This is an improvement over UCB1 which uses a more precise confidence radius, especially for small expected rewards.
  This algorithm has been constructed for Bernoulli reward distributions.
  Reference: https://arxiv.org/pdf/0809.4882.pdf
class_docstr_tok: ["This","is","an","improvement","over","UCB1","which","uses","a","more","precise","confidence","radius",",","especially","for","small","expected","rewards",".","This","algorithm","has","been","constructed","for","Bernoulli","reward","distributions",".","Reference",":","https",":","\/\/arxiv.org\/pdf\/0809.4882.pdf"]
docstr: Get per-arm UCB scores. The formula is
  UCB_i = AVG([rewards_i]) + SQRT(AVG([rewards_i]) * LN(T+1)/N_i) + LN(T+1)/N_i
  
  Returns:
      Tensor: An array of UCB scores (one per arm)
docstr_tok: ["Get","per-arm","UCB","scores",".","The","formula","is","UCB_i","=","AVG","(","[","rewards_i","]",")","+","SQRT","(","AVG","(","[","rewards_i","]",")","*","LN","(","T+1",")","\/N_i",")","+","LN","(","T+1",")","\/N_i","Returns",":","Tensor",":","An","array","of","UCB","scores","(","one","per","arm",")"]
code: def get_scores(self) -> Tensor:
      """
      Get per-arm UCB scores. The formula is
      UCB_i = AVG([rewards_i]) + SQRT(AVG([rewards_i]) * LN(T+1)/N_i) + LN(T+1)/N_i
  
      Returns:
          Tensor: An array of UCB scores (one per arm)
      """
      avg_rewards = self.get_avg_reward_values()
      log_t_over_ni = (
          math.log(self.total_n_obs_all_arms + 1)
          / self.total_n_obs_per_arm
      )
      return avg_rewards + self.alpha * (
          torch.sqrt(avg_rewards * log_t_over_ni) + log_t_over_ni
      )
  
imports: import math
  from abc import ABC, abstractmethod
  from typing import List, Optional
  import torch
  from reagent.mab.mab_algorithm import MABAlgo
  from torch import Tensor
label_desc: Use image node_id 1 for calling the MetricUCB obj's underlying member method code with example usage: obj.get_scores() and returns: unknown