class_docstr: Item-Based Nearest Neighbor.
  
  Parameters
  ----------
  name: string, default: 'ItemKNN'
      The name of the recommender model.
  
  k: int, optional, default: 20
      The number of nearest neighbors.
  
  similarity: str, optional, default: 'cosine'
      The similarity measurement. Supported types: ['cosine', 'pearson']
  
  mean_centered: bool, optional, default: False
      Whether values of the user-item rating matrix will be centered by the mean
      of their corresponding rows (mean rating of each user).
  
  weighting: str, optional, default: None
      The option for re-weighting the rating matrix. Supported types: ['idf', 'bm25'].
      If None, no weighting is applied.
  
  amplify: float, optional, default: 1.0
      Amplifying the influence on similarity weights.
  
  num_threads: int, optional, default: 0
      Number of parallel threads for training. If num_threads=0, all CPU cores will be utilized.
      If seed is not None, num_threads=1 to remove randomness from parallelization.
  
  seed: int, optional, default: None
      Random seed for weight initialization.
  
  References
  ----------
  * Sarwar, B., Karypis, G., Konstan, J., & Riedl, J. (2001, April). Item-based collaborative filtering recommendation algorithms. In Proceedings of the 10th international conference on World Wide Web (pp. 285-295).
  * Aggarwal, C. C. (2016). Recommender systems (Vol. 1). Cham: Springer International Publishing.
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 self.is_unknown_user(user_idx):
          raise ScoreException(
              "Can't make score prediction for user %d" % user_idx
          )
  
      if item_idx is not None and self.is_unknown_item(item_idx):
          raise ScoreException(
              "Can't make score prediction for item %d" % item_idx
          )
  
      if item_idx is not None:
          weighted_avg = compute_score_single(
              False,
              self.ui_mat[user_idx].A.ravel(),
              self.sim_mat.indptr[item_idx],
              self.sim_mat.indptr[item_idx + 1],
              self.sim_mat.indices,
              self.sim_mat.data,
              k=self.k,
          )
          return self.mean_arr[user_idx] + weighted_avg
  
      weighted_avg = np.zeros(self.num_items)
      compute_score(
          False,
          self.ui_mat[user_idx].A.ravel(),
          self.sim_mat.indptr,
          self.sim_mat.indices,
          self.sim_mat.data,
          k=self.k,
          num_threads=self.num_threads,
          output=weighted_avg,
      )
      return self.mean_arr[user_idx] + weighted_avg
  
imports: import multiprocessing
  import numpy
  from scipy.sparse import csr_matrix, coo_matrix
  from ..recommender import Recommender
  from ...exception import ScoreException
  from ...utils import get_rng
  from ...utils.fast_sparse_funcs import inplace_csr_row_normalize_l2
  from .similarity import compute_similarity, compute_score, compute_score_single
label_desc: Use image node_id 3 for calling the ItemKNN obj's underlying member method code with example usage: obj.score(user_idx, item_idx) and returns: unknown, unknown