plot.see_performance_roc: Plot method for ROC curves

View source: R/plot.performance_roc.R

plot.see_performance_rocR Documentation

Plot method for ROC curves

Description

The plot() method for the performance::performance_roc() function.

Usage

## S3 method for class 'see_performance_roc'
plot(x, ...)

Arguments

x

An object.

...

Arguments passed to or from other methods.

Value

A ggplot2-object.

Examples

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)

see documentation built on Sept. 11, 2024, 5:51 p.m.