class_docstr: Canonical implementation of UCB1
  Reference: https://www.cs.bham.ac.uk/internal/courses/robotics/lectures/ucb1.pdf
class_docstr_tok: ["Canonical","implementation","of","UCB1","Reference",":","https",":","\/\/www.cs.bham.ac.uk\/internal\/courses\/robotics\/lectures\/ucb1.pdf"]
code: def get_score_single_arm_id(
      self, arm_id: int, ucb_alpha: float
  ) -> Dict[str, float]:
      mu = (
          self.sum_reward_by_arm_id[arm_id]
          / self.obs_count_by_arm_id[arm_id]
      )
      sigma = self.get_variance(arm_id) ** 0.5
      return {
          "pred_label": mu,
          "pred_sigma": sigma,
          "ucb": mu
          + ucb_alpha
          * sigma
          * math.sqrt(
              2.0
              * math.log(self.num_obs_total + 1.0)
              / self.obs_count_by_arm_id[arm_id]
          ),
      }
  
file_path: ReAgent/reagent/models/mab.py
imports: import logging
  import math
  import time
  from abc import abstractmethod
  from typing import Dict, Optional
  import torch
  from reagent.core.types import CBInput
label_desc: Use image node_id 1 for calling the UCB1MAB obj's underlying member method code with example usage: obj.get_score_single_arm_id(arm_id, ucb_alpha) and returns: dict