code: def compute_MAPE_SMAPE_MASE(self, signal, estimator):
      self.mMAPE = None
      self.mSMAPE = None
      self.mMASE = None
      if signal.shape[0] > 0:
          lEps = 1.0e-10
          abs_error = np.abs(estimator.values - signal.values)
          sum_abs = (
              np.abs(signal.values) + np.abs(estimator.values) + lEps
          )
          abs_rel_error = abs_error / (np.abs(signal) + lEps)
          signal_diff = signal - signal.shift(1)
          self.mMAPE = np.mean(abs_rel_error)
          self.mSMAPE = np.mean(2.0 * abs_error / sum_abs)
          if signal_diff.shape[0] > 1:
              mean_dev_signal = (
                  np.mean(abs(signal_diff.values[1:])) + lEps
              )
              self.mMASE = np.mean(abs_error / mean_dev_signal)
              self.mMASE = round(self.mMASE, 4)
          self.mMAPE = round(self.mMAPE, 4)
          self.mSMAPE = round(self.mSMAPE, 4)
  
file_path: atspy/atspy/TS/Perf.py
imports: import pandas
  import numpy
  from .None import Utils
label_desc: Use image node_id 3 for calling the cPerf obj's underlying member method code with example usage: obj.compute_MAPE_SMAPE_MASE(signal, estimator) without return types