docstr: Method to compute bi values
  
  bi = (rui - mi - bu) / (regBi + number of interactions)
docstr_tok: ["Method","to","compute","bi","values","bi","=","(","rui","-","mi","-","bu",")","\/","(","regBi","+","number","of","interactions",")"]
code: def compute_bi(self):
      """
      Method to compute bi values
  
      bi = (rui - mi - bu) / (regBi + number of interactions)
  
      """
  
      self.bi = dict()
  
      for item in self.items:
          count = 0
  
          for user in self.train_set["users_viewed_item"].get(item, []):
              self.bi[item] = (
                  self.bi.get(item, 0)
                  + float(self.train_set["feedback"][user].get(item, 0))
                  - self.train_set["mean_value"]
                  - self.bu.get(user, 0)
              )
              count += 1
  
          if count > 1:
              self.bi[item] = float(self.bi[item]) / float(
                  self.reg_bi + count
              )
          elif count == 0:
              self.bi[item] = 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 4 for calling the BaseKNN obj's underlying member method code with example usage: obj.compute_bi() without return types