Created
March 3, 2018 13:23
-
-
Save conormm/06b0f995b8f917244dbb6229d4bc1d40 to your computer and use it in GitHub Desktop.
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
| logloss <- function(label, p) { | |
| if (label == 1) { | |
| x <- -log(p) | |
| } else { | |
| x <- -log(1 - p) | |
| } | |
| x | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment