Skip to content

Instantly share code, notes, and snippets.

@AayushSameerShah
Last active April 18, 2024 04:38
Show Gist options
  • Save AayushSameerShah/baeedbbb52fe808874d6debb7e786183 to your computer and use it in GitHub Desktop.
Save AayushSameerShah/baeedbbb52fe808874d6debb7e786183 to your computer and use it in GitHub Desktop.
Relative Root Mean Squared Error (RRMSE)
def relative_root_mean_squared_error(true, pred):
n = len(true) # update
num = np.sum(np.square(true - pred)) / n # update
den = np.sum(np.square(pred))
squared_error = num/den
rrmse_loss = np.sqrt(squared_error)
return rrmse_loss
@pmingkr
Copy link

pmingkr commented Apr 18, 2024

it seems this formula has an error.
need to divide with the average but it divides with the root average. because the average value is inside of the root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment