code: def r2_score(
      pred, true, sample_weight=None, multioutput="uniform_average"
  ):
      """Computes R^2(coefficient of determination) regression score function.
  
      Args:
          pred (:class:`~chainer.Variable` or :ref:`ndarray`): Variable holding a
              vector, matrix or tensor of estimated target values.
          true (:class:`~chainer.Variable` or :ref:`ndarray`): Variable holding a
              vector, matrix or tensor of correct target values.
          sample_weight: This argument is for compatibility with scikit-learn's
                  implementation of r2_score. Current implementation admits None
                  only.
          multioutput(string): ['uniform_average', 'raw_values']. if
                  'uniform_average', this function returns an average of R^2
                  score of multiple output. If 'raw_average', this function
                  return a set of R^2 score of multiple output.
      Returns:
          ~chainer.Variable: A Variable holding a scalar array of the R^2 score
          if 'multioutput' is 'uniform_average' or a vector of R^2 scores if
          'multioutput' is 'raw_values'.
  
      .. note:: This function is non-differentiable.
  
      """
      return R2_score(
          sample_weight=sample_weight, multioutput=multioutput
      )(pred, true)
  
file_path: chainer/chainer/functions/evaluation/r2_score.py
imports: from chainer import backend
  from chainer import function
  from chainer.utils import type_check
label_desc: Use image node_id 1 for calling a global function with example usage: r2_score(pred, true, sample_weight, multioutput) and returns: R2_score