class_docstr: The known rating algorithm memorizes ratings provided in the fit method.
class_docstr_tok: ["The","known","rating","algorithm","memorizes","ratings","provided","in","the","fit","method","."]
code: def fit(self, ratings, **kwargs):
      self.ratings = ratings.set_index(["user", "item"]).sort_index()
      return self
  
imports: import logging
  from collections.abc import Iterable, Sequence
  import pandas
  import numpy
  from ..data import sparse_ratings
  from .None import Predictor, Recommender, CandidateSelector
  from ..util import derivable_rng
  from .bias import Bias
  from .ranking import TopN
label_desc: Use image node_id 1 for calling the KnownRating obj's underlying member method code with example usage: obj.fit(ratings) and returns: self