View source: R/plot.performance_roc.R
plot.see_performance_roc | R Documentation |
The plot()
method for the performance::performance_roc()
function.
## S3 method for class 'see_performance_roc'
plot(x, ...)
x |
An object. |
... |
Arguments passed to or from other methods. |
A ggplot2-object.
library(performance)
data(iris)
set.seed(123)
iris$y <- rbinom(nrow(iris), size = 1, .3)
folds <- sample(nrow(iris), size = nrow(iris) / 8, replace = FALSE)
test_data <- iris[folds, ]
train_data <- iris[-folds, ]
model <- glm(y ~ Sepal.Length + Sepal.Width, data = train_data, family = "binomial")
result <- performance_roc(model, new_data = test_data)
result
plot(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.