clplots: Receiver operating characteristic plots for outcome classes.

View source: R/class_stats.R

clplotsR Documentation

Receiver operating characteristic plots for outcome classes.

Description

Draws receiver operating characteristic (ROC) plots for particular outcome classes. The ROC statistics for particular classes are obtained by comparing the given class the remaining ones (one versus rest comparison).

Usage

clplots(x, ...)

## S3 method for class 'predx'
clplots(x, one_plot = TRUE, ...)

## S3 method for class 'caretx'
clplots(x, newdata = NULL, one_plot = TRUE, ...)

Arguments

x

a predx prediction object or a caretx model.

...

extra arguments passed to plot_class_roc.

one_plot

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

newdata

optional, a data frame with the test data.

Details

The function employs internally multiClassSummary and plotting tools from the plotROC package. clplots is a S3 generic function.

Value

a single ggplot object or a list of ggplot objects. For clplots.caretex a list of ggplots with plots for the training data, resamples and, if newdata is specified, also for the test data set.


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