code: def computeCriterion(self, signal, estimator, criterion, name):
      self.mName = name
  
      self.mCount = signal.shape[0]
      if criterion == "L1" or criterion == "MAE":
          myerror = estimator.values - signal.values
          abs_error = abs(myerror)
          self.mL1 = np.mean(abs_error)
          return self.mL1
      if criterion == "L2" or criterion == "RMSE":
          myerror = estimator.values - signal.values
          self.mL2 = np.sqrt(np.mean(myerror**2))
          return self.mL2
      if criterion == "R2":
          self.mR2 = self.compute_R2(signal, estimator)
          return self.mR2
      if criterion == "PEARSONR":
          self.mPearsonR = self.compute_pearson_r(signal, estimator)
          return self.mPearsonR
  
      if criterion == "MAPE":
          self.compute_MAPE_SMAPE_MASE(signal, estimator)
          return self.mMAPE
  
      if criterion == "SMAPE":
          self.compute_MAPE_SMAPE_MASE(signal, estimator)
          return self.mSMAPE
  
      if criterion == "MASE":
          self.compute_MAPE_SMAPE_MASE(signal, estimator)
          return self.mMASE
  
      if criterion == "COUNT":
          return self.mCount
  
      assert 0
      return 0.0
  
file_path: atspy/atspy/TS/Perf.py
imports: import pandas
  import numpy
  from .None import Utils
label_desc: Use image node_id 9 for calling the cPerf obj's underlying member method code with example usage: obj.computeCriterion(signal, estimator, criterion, name) and returns: int, self, self, self, self, self, self, self, self