class_docstr: Mean Squared Error.
  
  Attributes
  ----------
  name: string, value: 'MSE'
      Name of the measure.
docstr: Compute Mean Squared Error.
  
  Parameters
  ----------
  gt_ratings: Numpy array
      Ground-truth rating values.
  
  pd_ratings: Numpy array
      Predicted rating values.
  
  weights: Numpy array, optional, default: None
      Weights for rating values.
  
  **kwargs: For compatibility
  
  Returns
  -------
  mse: A scalar.
      Mean Squared Error.
docstr_tok: ["Compute","Mean","Squared","Error",".","Parameters","--","--","--","--","--","gt_ratings",":","Numpy","array","Ground-truth","rating","values",".","pd_ratings",":","Numpy","array","Predicted","rating","values",".","weights",":","Numpy","array",",","optional",",","default",":","None","Weights","for","rating","values",".","*","*","kwargs",":","For","compatibility","Returns","--","--","--","-","mse",":","A","scalar",".","Mean","Squared","Error","."]
code: def compute(self, gt_ratings, pd_ratings, weights=None, **kwargs):
      """Compute Mean Squared Error.
  
      Parameters
      ----------
      gt_ratings: Numpy array
          Ground-truth rating values.
  
      pd_ratings: Numpy array
          Predicted rating values.
  
      weights: Numpy array, optional, default: None
          Weights for rating values.
  
      **kwargs: For compatibility
  
      Returns
      -------
      mse: A scalar.
          Mean Squared Error.
  
      """
      mse = np.average(
          (gt_ratings - pd_ratings) ** 2, axis=0, weights=weights
      )
      return mse
  
file_path: cornac/cornac/metrics/rating.py
imports: import numpy
label_desc: Use image node_id 2 for calling the MSE obj's underlying member method code with example usage: obj.compute(gt_ratings, pd_ratings, weights) and returns: mse