Description Usage Arguments Value Examples
Takes in a vector of prediction labels and a vector of prediction probabilities.
1 | plot_roc(y_label, predict_proba)
|
y_label |
a numeric vector contains the validation set label, all elements should be either 0 or 1 |
predict_proba |
a numberic vector contains the prediction probabilities |
A plot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
library(RMLViz)
set.seed(420)
num.samples <- 100
weight <- sort(rnorm(n=num.samples, mean=172, sd=29))
bese <- ifelse(test=(runif(n=num.samples) < (rank(weight)/num.samples)),
yes=1, no=0)
glm.fit=glm(obese ~ weight, family=binomial)
obese_proba <- glm.fit$fitted.values
plot_roc(obese, obese_proba)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.