code: def regret(self):
          '''
          Calculate expected regret, where expected regret is
          maximum optimal reward - sum of collected rewards, i.e.
  
          expected regret = T*max_k(mean_k) - sum_(t=1-->T) (reward_t)
  
          Returns
          -------
          float
          '''
  
          return (sum(self.pulls)*np.max(np.nan_to_num(self.wins/self.pulls)) -
                  sum(self.wins)) / sum(self.pullsf regret(self):
          '''
          Calculate expected regret, where expected regret is
          maximum optimal reward - sum of collected rewards, i.e.
  
          expected regret = T*max_k(mean_k) - sum_(t=1-->T) (reward_t)
  
          Returns
          -------
          float
          '''
  
          return (sum(self.pulls)*np.max(np.nan_to_num(self.wins/self.pulls)) -
                  sum(self.wins)) / sum(self.pulls)
docs: Calculate expected regret, where expected regret is
          maximum optimal reward - sum of collected rewards, i.e.
  
          expected regret = T*max_k(mean_k) - sum_(t=1-->T) (reward_t)
  
          Returns
          -------
          float