code: def compute_R2(self, signal, estimator):
      SST = (
          np.sum((signal.values - np.mean(signal.values)) ** 2)
          + 1.0e-10
      )
      SSRes = np.sum((signal.values - estimator.values) ** 2)
      R2 = 1 - SSRes / SST
      return R2
  
file_path: atspy/atspy/TS/Perf.py
imports: import pandas
  import numpy
  from .None import Utils
label_desc: Use image node_id 4 for calling the cPerf obj's underlying member method code with example usage: obj.compute_R2(signal, estimator) and returns: R2