Skip to content

Instantly share code, notes, and snippets.

@revodavid
Created August 2, 2016 15:08
Show Gist options
  • Select an option

  • Save revodavid/720fdbd9d6e17d4809b20666e000c8e2 to your computer and use it in GitHub Desktop.

Select an option

Save revodavid/720fdbd9d6e17d4809b20666e000c8e2 to your computer and use it in GitHub Desktop.
library(pROC)
plot(roc(test_set$bad_widget, glm_response_scores, direction="<"),
col="yellow", lwd=3, main="The turtle finds its way")
##
## Call:
## roc.default(response = test_set$bad_widget, predictor = glm_response_scores, direction = "<")
##
## Data: glm_response_scores in 59 controls (test_set$bad_widget FALSE) < 66 cases (test_set$bad_widget TRUE).
## Area under the curve: 0.9037
glm_simple_roc <- simple_roc(test_set$bad_widget=="TRUE", glm_link_scores)
with(glm_simple_roc, points(1 - FPR, TPR, col=1 + labels))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment