-
-
Save sbalci/b618ea9845a2f8a0a245417835d2ae96 to your computer and use it in GitHub Desktop.
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
simple_roc <- function(labels, scores){ | |
labels <- labels[order(scores, decreasing=TRUE)] | |
data.frame(TPR=cumsum(labels)/sum(labels), FPR=cumsum(!labels)/sum(!labels), labels) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment