class_docstr: Predicts user ratings of items.  Predictions are really estimates of the user's like or
  dislike, and the ``Predictor`` interface makes no guarantees about their scale or
  granularity.
  
  :canonical: lenskit.Predictor
class_docstr_tok: ["Predicts","user","ratings","of","items",".","Predictions","are","really","estimates","of","the","user","'s","like","or","dislike",",","and","the","``","Predictor","``","interface","makes","no","guarantees","about","their","scale","or","granularity",".",":","canonical",":","lenskit.Predictor"]
docstr: Compute predictions for user-item pairs.  This method is designed to be compatible with the
  general SciKit paradigm; applications typically want to use :py:meth:`predict_for_user`.
  
  Args:
      pairs(pandas.DataFrame): The user-item pairs, as ``user`` and ``item`` columns.
      ratings(pandas.DataFrame): user-item rating data to replace memorized data.
  
  Returns:
      pandas.Series: The predicted scores for each user-item pair.
docstr_tok: ["Compute","predictions","for","user-item","pairs",".","This","method","is","designed","to","be","compatible","with","the","general","SciKit","paradigm",";","applications","typically","want","to","use",":","py",":","meth",":","`","predict_for_user","`",".","Args",":","pairs","(","pandas.DataFrame",")",":","The","user-item","pairs",",","as","``","user","``","and","``","item","``","columns",".","ratings","(","pandas.DataFrame",")",":","user-item","rating","data","to","replace","memorized","data",".","Returns",":","pandas.Series",":","The","predicted","scores","for","each","user-item","pair","."]
code: def predict(self, pairs, ratings=None):
      """
      Compute predictions for user-item pairs.  This method is designed to be compatible with the
      general SciKit paradigm; applications typically want to use :py:meth:`predict_for_user`.
  
      Args:
          pairs(pandas.DataFrame): The user-item pairs, as ``user`` and ``item`` columns.
          ratings(pandas.DataFrame): user-item rating data to replace memorized data.
  
      Returns:
          pandas.Series: The predicted scores for each user-item pair.
      """
      if ratings is not None:
          raise NotImplementedError()
  
      def upred(df):
          (user,) = df["user"].unique()
          items = df["item"]
          preds = self.predict_for_user(user, items)
          preds.name = "prediction"
          res = df.join(preds, on="item", how="left")
          return res.prediction
  
      res = (
          pairs.loc[:, ["user", "item"]]
          .groupby("user", sort=False)
          .apply(upred)
      )
      res.reset_index(level="user", inplace=True, drop=True)
      res.name = "prediction"
      return res.loc[pairs.index.values]
  
file_path: lkpy/lenskit/algorithms/__init__.py
imports: from abc import ABCMeta, abstractmethod
  import inspect
label_desc: Use image node_id 1 for calling the Predictor obj's underlying member method code with example usage: obj.predict(pairs, ratings) and returns: res, res