class_docstr: Most Popular. Item are recommended based on their popularity (not personalized).
  
  Parameters
  ----------
  name: string, default: 'MostPop'
      The name of the recommender model.
docstr: Predict the scores/ratings of a user for an item.
  
  Parameters
  ----------
  user_idx: int, required
      The index of the user for whom to perform score prediction.
  
  item_idx: int, optional, default: None
      The index of the item for which to perform score prediction.
      If None, scores for all known items will be returned.
  
  Returns
  -------
  res : A scalar or a Numpy array
      Relative scores that the user gives to the item or to all known items
docstr_tok: ["Predict","the","scores\/ratings","of","a","user","for","an","item",".","Parameters","--","--","--","--","--","user_idx",":","int",",","required","The","index","of","the","user","for","whom","to","perform","score","prediction",".","item_idx",":","int",",","optional",",","default",":","None","The","index","of","the","item","for","which","to","perform","score","prediction",".","If","None",",","scores","for","all","known","items","will","be","returned",".","Returns","--","--","--","-","res",":","A","scalar","or","a","Numpy","array","Relative","scores","that","the","user","gives","to","the","item","or","to","all","known","items"]
code: def score(self, user_idx, item_idx=None):
      """Predict the scores/ratings of a user for an item.
  
      Parameters
      ----------
      user_idx: int, required
          The index of the user for whom to perform score prediction.
  
      item_idx: int, optional, default: None
          The index of the item for which to perform score prediction.
          If None, scores for all known items will be returned.
  
      Returns
      -------
      res : A scalar or a Numpy array
          Relative scores that the user gives to the item or to all known items
      """
      if item_idx is None:
          return self.item_pop
      else:
          if not self.knows_item(item_idx):
              raise ScoreException(
                  "Can't make score prediction for (user_id=%d, item_id=%d)"
                  % (user_idx, item_idx)
              )
          return self.item_pop[item_idx]
  
file_path: cornac/cornac/models/most_pop/recom_most_pop.py
imports: import numpy
  from ..recommender import Recommender
  from ...exception import ScoreException
label_desc: Use image node_id 3 for calling the MostPop obj's underlying member method code with example usage: obj.score(user_idx, item_idx) and returns: self, self