code: def R2_score(X_original, X_predicted):
      """Returns the R^2 (coefficient of determination) regression score function.
      Best possible score is 1.0 and it can be negative (because prediction can be
      arbitrarily worse).
  
      Parameters
      ----------
      X_original: array
          The original array
      X_predicted: array
          Thre predicted array.
  
      Returns
      -------
      float
      """
      return (
          1
          - T.norm(X_predicted - X_original) ** 2.0
          / T.norm(X_original) ** 2.0
      )
  
file_path: tensorly/tensorly/metrics/regression.py
imports: from ..None import backend
label_desc: Use image node_id 3 for calling a global function with example usage: R2_score(X_original, X_predicted) and returns: unknown