roc_plot: Plots ROC curves for training and test data.

View source: R/roc.R

roc_plotR Documentation

Plots ROC curves for training and test data.

Description

Returns a ggplot of a ROC curve from prediction and target vectors. These are partitioned by the argument train into two separate curves so that differences between train and test data can be seen. AUC for each is printed. Functions from ROCR are used.

Usage

roc_plot(pred, target, train, test = NULL)

Arguments

pred

A vector of prediction probabilities.

target

A vector of outcome classes corresponding to pred.

train

A vector of indices indicating which predictions are "training" data.

test

Optional vector of indices indicating which predictions are "test" data. Defaults to NULL, in which case test will be set to the data not in train.


jedwards24/jemodel documentation built on July 1, 2023, 3:59 p.m.