code: def rmse(
      y: np.ndarray,
      y_hat: np.ndarray,
      weights: Optional[np.ndarray] = None,
      axis: Optional[int] = None,
  ) -> Union[float, np.ndarray]:
      """Root Mean Squared Error
  
      Calculates Root Mean Squared Error between
      `y` and `y_hat`. RMSE measures the relative prediction
      accuracy of a forecasting method by calculating the squared deviation
      of the prediction and the observed value at a given time and
      averages these devations over the length of the series.
      Finally the RMSE will be in the same scale
      as the original time series so its comparison with other
      series is possible only if they share a common scale.
      RMSE has a direct connection to the L2 norm.
  
      $$ \mathrm{RMSE}(\\mathbf{y}_{\\tau}, \\mathbf{\hat{y}}_{\\tau}) = \\sqrt{\\frac{1}{H} \\sum^{t+H}_{\\tau=t+1} (y_{\\tau} - \hat{y}_{\\tau})^{2}} $$
  
      **Parameters:**<br>
      `y`: numpy array, Actual values.<br>
      `y_hat`: numpy array, Predicted values.<br>
      `mask`: numpy array, Specifies date stamps per serie to consider in loss.<br>
  
      **Returns:**<br>
      `rmse`: numpy array, (single value).
      """
      return np.sqrt(mse(y, y_hat, weights, axis))
  
file_path: neuralforecast/neuralforecast/losses/numpy.py
imports: from typing import Optional, Union
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: rmse(y, y_hat, weights, axis) and returns: np