Last active
October 5, 2020 17:23
-
-
Save shreyas90999/aa4d22538febae98248980fa0fe76644 to your computer and use it in GitHub Desktop.
RMSLE error function
This file contains 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
#RMSLE error function | |
def rmsle_error(y, y_pred): | |
assert len(y) == len(y_pred) | |
to_sum = [(math.log(y_pred[i] + 1) - math.log(y[i] + 1)) ** 2.0 for i,pred in enumerate(y_pred)] | |
return (sum(to_sum) * (1.0/len(y))) ** 0.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment