docstr: Method to compute bu values
  
  bu = (rui - mi - bi) / (regBu + number of interactions)
docstr_tok: ["Method","to","compute","bu","values","bu","=","(","rui","-","mi","-","bi",")","\/","(","regBu","+","number","of","interactions",")"]
code: def compute_bu(self):
      """
      Method to compute bu values
  
      bu = (rui - mi - bi) / (regBu + number of interactions)
  
      """
  
      self.bu = dict()
      for user in self.users:
          count = 0
  
          for item in self.train_set["items_seen_by_user"].get(
              user, []
          ):
              self.bu[user] = (
                  self.bu.get(user, 0)
                  + float(self.train_set["feedback"][user].get(item, 0))
                  - self.train_set["mean_value"]
                  - self.bi.get(item, 0)
              )
              count += 1
  
          if count > 1:
              self.bu[user] = float(self.bu[user]) / float(
                  self.reg_bu + count
              )
          elif count == 0:
              self.bu[user] = self.train_set["mean_value"]
  
file_path: CaseRecommender/caserec/recommenders/rating_prediction/base_knn.py
imports: from caserec.recommenders.rating_prediction.base_rating_prediction import BaseRatingPrediction
label_desc: Use image node_id 5 for calling the BaseKNN obj's underlying member method code with example usage: obj.compute_bu() without return types