class_docstr: LightGCN
  
  Parameters
  ----------
  name: string, default: 'LightGCN'
      The name of the recommender model.
  
  emb_size: int, default: 64
      Size of the node embeddings.
  
  num_epochs: int, default: 1000
      Maximum number of iterations or the number of epochs.
  
  learning_rate: float, default: 0.001
      The learning rate that determines the step size at each iteration
  
  batch_size: int, default: 1024
      Mini-batch size used for train set
  
  num_layers: int, default: 3
      Number of LightGCN Layers
  
  early_stopping: {min_delta: float, patience: int}, optional, default: None
      If `None`, no early stopping. Meaning of the arguments:
  
      - `min_delta`:  the minimum increase in monitored value on validation
                      set to be considered as improvement,
                      i.e. an increment of less than min_delta will count as
                      no improvement.
  
      - `patience`:   number of epochs with no improvement after which
                      training should be stopped.
  
  lambda_reg: float, default: 1e-4
      Weight decay for the L2 normalization
  
  trainable: boolean, optional, default: True
      When False, the model is not trained and Cornac assumes that the model
      is already pre-trained.
  
  verbose: boolean, optional, default: False
      When True, some running logs are displayed.
  
  seed: int, optional, default: 2020
      Random seed for parameters initialization.
  
  References
  ----------
  *   He, X., Deng, K., Wang, X., Li, Y., Zhang, Y., & Wang, M. (2020).
      LightGCN: Simplifying and Powering Graph Convolution Network for
      Recommendation.
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 item_idx is None:
          if not self.knows_user(user_idx):
              raise ScoreException(
                  "Can't make score prediction for (user_id=%d)"
                  % user_idx
              )
          known_item_scores = self.V.dot(self.U[user_idx, :])
          return known_item_scores
      else:
          if not (
              self.knows_user(user_idx) and self.knows_item(item_idx)
          ):
              raise ScoreException(
                  "Can't make score prediction for (user_id=%d, item_id=%d)"
                  % (user_idx, item_idx)
              )
          return self.V[item_idx, :].dot(self.U[user_idx, :])
  
file_path: cornac/cornac/models/lightgcn/recom_lightgcn.py
imports: from ..recommender import Recommender
  from ..recommender import ANNMixin, MEASURE_DOT
  from ...exception import ScoreException
  from tqdm.auto import tqdm, trange
label_desc: Use image node_id 4 for calling the LightGCN obj's underlying member method code with example usage: obj.score(user_idx, item_idx) and returns: known_item_scores, self