code: def rmae(
      y: np.ndarray,
      y_hat1: np.ndarray,
      y_hat2: np.ndarray,
      weights: Optional[np.ndarray] = None,
      axis: Optional[int] = None,
  ) -> Union[float, np.ndarray]:
      """RMAE
  
      Calculates Relative Mean Absolute Error (RMAE) between
      two sets of forecasts (from two different forecasting methods).
      A number smaller than one implies that the forecast in the
      numerator is better than the forecast in the denominator.
  
      $$ \mathrm{rMAE}(\\mathbf{y}_{\\tau}, \\mathbf{\hat{y}}_{\\tau}, \\mathbf{\hat{y}}^{base}_{\\tau}) = \\frac{1}{H} \sum^{t+H}_{\\tau=t+1} \\frac{|y_{\\tau}-\hat{y}_{\\tau}|}{\mathrm{MAE}(\\mathbf{y}_{\\tau}, \\mathbf{\hat{y}}^{base}_{\\tau})} $$
  
      **Parameters:**<br>
      `y`: numpy array, observed values.<br>
      `y_hat1`: numpy array. Predicted values of first model.<br>
      `y_hat2`: numpy array. Predicted values of baseline model.<br>
      `weights`: numpy array, optional. Weights for weighted average.<br>
      `axis`: None or int, optional.Axis or axes along which to average a.<br>
          The default, axis=None, will average over all of the elements of
          the input array.
  
      **Returns:**<br>
      `rmae`: numpy array or double.
  
      **References:**<br>
      [Rob J. Hyndman, & Koehler, A. B. "Another look at measures of forecast accuracy".](https://www.sciencedirect.com/science/article/pii/S0169207006000239)
      """
      numerator = mae(y=y, y_hat=y_hat1, weights=weights, axis=axis)
      denominator = mae(y=y, y_hat=y_hat2, weights=weights, axis=axis)
      rmae = numerator / denominator
  
      return rmae
  
file_path: neuralforecast/neuralforecast/losses/numpy.py
imports: from typing import Optional, Union
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: rmae(y, y_hat1, y_hat2, weights, axis) and returns: rmae