class_docstr: Graph Convolutional Matrix Completion (GCMC)
  
  Parameters
  ----------
  name: string, default: 'GCMC'
      The name of the recommender model.
  
  max_iter: int, default: 2000
      Maximum number of iterations or the number of epochs for SGD
  
  learning_rate: float, default: 0.01
      The learning rate for SGD
  
  optimizer: string, default: 'adam'. Supported values: 'adam','sgd'.
      The optimization method used for SGD
  
  activation_func: string, default: 'leaky'
      The activation function used in the GCMC model. Supported values:
      ['leaky', 'linear','sigmoid','relu', 'tanh']
  
  gcn_agg_units: int, default: 500
      The number of units in the graph convolutional layers
  
  gcn_out_units: int, default: 75
      The number of units in the output layer
  
  gcn_dropout: float, default: 0.7
      The dropout rate for the graph convolutional layers
  
  gcn_agg_accum: string, default:'stack'
      The graph convolutional layer aggregation type. Supported values:
      ['stack', 'sum']
  
  share_param: bool, default: False
      Whether to share the parameters in the graph convolutional layers
  
  gen_r_num_basis_func: int, default: 2
      The number of basis functions used in the generating rating function
  
  train_grad_clip: float, default: 1.0
      The gradient clipping value for training
  
  train_valid_interval: int, default: 1
      The validation interval for training
  
  train_early_stopping_patience: int, default: 100
      The patience for early stopping
  
  train_min_learning_rate: float, default: 0.001
      The minimum learning rate for SGD
  
  train_decay_patience: int, default: 50
      The patience for learning rate decay
  
  train_lr_decay_factor: float, default: 0.5
      The learning rate decay factor
  
  trainable: boolean, default: True
      When False, the model is not trained and Cornac
  
  verbose: boolean, default: True
      When True, some running logs are displayed
  
  seed: int, default: None
      Random seed for parameters initialization
  
  References
  ----------
  * van den Berg, R., Kipf, T. N., & Welling, M. (2018). Graph Convolutional Matrix Completion.
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:
          # Return scores of all items for a given user
          return self.model.predict_one(user_idx)
      # Return score of known user/item
      return self.u_i_rating_dict.get(
          f"{user_idx}-{item_idx}", self.default_score()
      )
  
file_path: cornac/cornac/models/gcmc/recom_gcmc.py
imports: import numpy
  from ..recommender import Recommender
label_desc: Use image node_id 4 for calling the GCMC obj's underlying member method code with example usage: obj.score(user_idx, item_idx) and returns: self, self