plot_class_roc: Receiver operating characteristic plots for outcome classes.

View source: R/utils_class.R

plot_class_rocR Documentation

Receiver operating characteristic plots for outcome classes.

Description

Plots receiver-operating characteristic (ROC) plots for outcome classes. ROC metrics for particular classes are obtained in an one versus rest comparison.

Usage

plot_class_roc(
  predx_object,
  one_plot = FALSE,
  palette = NULL,
  line_size = 0.5,
  point_size = 0.3,
  plot_title = NULL,
  plot_subtitle = NULL,
  plot_tag = NULL,
  show_annotation = TRUE,
  annotation_size = 2.75,
  annotation_x = 0.6,
  annotation_y = 0.3,
  annotation_offset = 0.1,
  annotation_hjust = 0,
  annotation_vjust = 1,
  cust_theme = NULL,
  ...
)

Arguments

predx_object

a predx class object.

one_plot

logical: should all ROC curves be presented in one plot?

palette

a character vector with color names of hex codes. If NULL, the default ggplot2 palette is used.

line_size

width of the ROC curve lines.

point_size

size of the plot point.

plot_title

plot title.

plot_subtitle

plot subtitle.

plot_tag

plot tag.

show_annotation

logical: should sensitivity and specificity values be displayed in the plot?

annotation_size

size of the annotation text and of the cutoff label.

annotation_x

annotation x position.

annotation_y

annotation y position.

annotation_offset

line spacing in the annotation text. Applies only if one_plot = TRUE.

annotation_hjust

horizontal justification of the annotation text.

annotation_vjust

horizontal justification of the annotation text.

cust_theme

custom ggplot theme. If NULL, the default ROC theme of the plotROC is used.

...

extra arguments passed to geom_roc.

Details

For regression, NULL is returned with a warning.

Value

if one_plot = TRUE a single ggplot object. Otherwise, a list of ggplot objects.


PiotrTymoszuk/caretExtra documentation built on Oct. 15, 2023, 10:03 p.m.