class_docstr: :class:`CandidateSelector` that selects items a user has not rated as
  candidates.  When this selector is fit, it memorizes the rated items.
  
  Attributes:
      items_(pandas.Index): All known items.
      users_(pandas.Index): All known users.
      user_items_(CSR):
          Items rated by each known user, as positions in the ``items`` index.
class_docstr_tok: [":","class",":","`","CandidateSelector","`","that","selects","items","a","user","has","not","rated","as","candidates",".","When","this","selector","is","fit",",","it","memorizes","the","rated","items",".","Attributes",":","items_","(","pandas.Index",")",":","All","known","items",".","users_","(","pandas.Index",")",":","All","known","users",".","user_items_","(","CSR",")",":","Items","rated","by","each","known","user",",","as","positions","in","the","``","items","``","index","."]
code: def candidates(self, user, ratings=None):
      if ratings is None:
          try:
              uidx = self.users_.get_loc(user)
              uis = self.user_items_.row_cs(uidx)
          except KeyError:
              uis = None
      else:
          uis = self.items_.get_indexer(self.rated_items(ratings))
          uis = uis[uis >= 0]
  
      if uis is not None:
          mask = np.full(len(self.items_), True)
          mask[uis] = False
          return self.items_.values[mask]
      else:
          return self.items_.values
  
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 2 for calling the UnratedItemCandidateSelector obj's underlying member method code with example usage: obj.candidates(user, ratings) and returns: self, self