class_docstr: The Thompson Sampling MAB with Bernoulli-Beta distribution for rewards.
  Appropriate for MAB with Bernoulli rewards (e.g CTR)
class_docstr_tok: ["The","Thompson","Sampling","MAB","with","Bernoulli-Beta","distribution","for","rewards",".","Appropriate","for","MAB","with","Bernoulli","rewards","(","e.g","CTR",")"]
docstr: Get samples from the posterior distributions of arm rewards
docstr_tok: ["Get","samples","from","the","posterior","distributions","of","arm","rewards"]
code: def _get_posterior_samples(self) -> Tensor:
      """
      Get samples from the posterior distributions of arm rewards
      """
      return torch.distributions.beta.Beta(
          1 + self.total_sum_reward_per_arm,
          1 + self.total_n_obs_per_arm - self.total_sum_reward_per_arm,
      ).sample()
  
file_path: ReAgent/reagent/mab/thompson_sampling.py
imports: from abc import abstractmethod
  from typing import List, Optional
  import torch
  from reagent.mab.mab_algorithm import MABAlgo, reindex_multiple_tensors
  from torch import Tensor
label_desc: Use image node_id 1 for calling the BernoulliBetaThompson obj's underlying member method code with example usage: obj._get_posterior_samples() and returns: torch