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.
  
      """
  
      for user in set(self.users):
          predictions = list()
  
          for item in self.train_set["items_unobserved"].get(user, []):
              if self.as_binary:
                  predictions.append(
                      (
                          user,
                          item,
                          len(
                              self.train_set["users_viewed_item"][item]
                          ),
                      )
                  )
              else:
                  count_value = 0
                  for user_v in self.train_set["users_viewed_item"][
                      item
                  ]:
                      count_value += self.train_set["feedback"][user_v][
                          item
                      ]
                  predictions.append((user, item, count_value))
  
          predictions = sorted(predictions, key=lambda x: -x[2])
          self.ranking += predictions[: self.rank_length]
  
imports: from caserec.recommenders.item_recommendation.base_item_recommendation import BaseItemRecommendation
  from caserec.utils.extra_functions import timed
label_desc: Use image node_id 2 for calling the MostPopular obj's underlying member method code with example usage: obj.predict() without return types