Last active
August 15, 2024 08:41
-
-
Save AayushSameerShah/baeedbbb52fe808874d6debb7e786183 to your computer and use it in GitHub Desktop.
Relative Root Mean Squared Error (RRMSE)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This formula seems to be wrong
It should be like rmse/np.mean(true)