Skip to content

Instantly share code, notes, and snippets.

@conormm
Created March 3, 2018 13:23
Show Gist options
  • Select an option

  • Save conormm/06b0f995b8f917244dbb6229d4bc1d40 to your computer and use it in GitHub Desktop.

Select an option

Save conormm/06b0f995b8f917244dbb6229d4bc1d40 to your computer and use it in GitHub Desktop.
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