Skip to content

Instantly share code, notes, and snippets.

@AayushSameerShah
Last active August 15, 2024 08:41
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
@lwq-star
Copy link

This formula seems to be wrong
It should be like rmse/np.mean(true)

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