Created
February 23, 2018 11:56
-
-
Save StevenReitsma/19e160b6fbb1e8109d6b401f83e3ea4f to your computer and use it in GitHub Desktop.
Blogpost-Heineken10
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
def neg_sq_loss(labels, preds): | |
a = -0.1 | |
err = preds - labels | |
grad = 2 * err * (np.sign(err) + a)**2 | |
hess = 2 * (np.sign(err) + a)**2 | |
return grad, hess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment