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: Fit the model to observations.
  
  Parameters
  ----------
  train_set: :obj:`cornac.data.Dataset`, required
      User-Item preference data as well as additional modalities.
  
  val_set: :obj:`cornac.data.Dataset`, optional, default: None
      User-Item preference data for model selection purposes (e.g., early stopping).
  
  Returns
  -------
  self : object
docstr_tok: ["Fit","the","model","to","observations",".","Parameters","--","--","--","--","--","train_set",":",":","obj",":","`","cornac.data.Dataset","`",",","required","User-Item","preference","data","as","well","as","additional","modalities",".","val_set",":",":","obj",":","`","cornac.data.Dataset","`",",","optional",",","default",":","None","User-Item","preference","data","for","model","selection","purposes","(","e.g.",",","early","stopping",")",".","Returns","--","--","--","-","self",":","object"]
code: def fit(self, train_set, val_set=None):
      """Fit the model to observations.
  
      Parameters
      ----------
      train_set: :obj:`cornac.data.Dataset`, required
          User-Item preference data as well as additional modalities.
  
      val_set: :obj:`cornac.data.Dataset`, optional, default: None
          User-Item preference data for model selection purposes (e.g., early stopping).
  
      Returns
      -------
      self : object
      """
      Recommender.fit(self, train_set, val_set)
  
      self.item_pop = np.ediff1d(train_set.csc_matrix.indptr)
  
      return self
  
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 2 for calling the MostPop obj's underlying member method code with example usage: obj.fit(train_set, val_set) and returns: self