docstr: This method predict final result, building an rank of each user of the train set.
docstr_tok: ["This","method","predict","final","result",",","building","an","rank","of","each","user","of","the","train","set","."]
code: def predict(self):
      """
      This method predict final result, building an rank of each user of the train set.
  
      """
  
      w = self.bias.T + np.dot(self.p, self.q.T)
  
      for u, user in enumerate(self.users):
          partial_ranking = list()
          candidate_items = sorted(
              range(len(w[u])), key=lambda k: w[u][k], reverse=True
          )
  
          for i in candidate_items:
              item = self.item_id_to_item[i]
  
              if item not in self.train_set["items_seen_by_user"].get(
                  user, self.items
              ):
                  partial_ranking.append((user, item, w[u][i]))
  
              if len(partial_ranking) == self.rank_length:
                  break
  
          self.ranking += partial_ranking
  
file_path: CaseRecommender/caserec/recommenders/item_recommendation/bprmf.py
imports: import random
  import numpy
  from caserec.recommenders.item_recommendation.base_item_recommendation import BaseItemRecommendation
  from caserec.utils.extra_functions import timed
label_desc: Use image node_id 8 for calling the BprMF obj's underlying member method code with example usage: obj.predict() without return types