ROCR (version 1.0-11)

ROCR.simple: Data set: Simple artificial prediction data for use with ROCR

Description

A mock data set containing a simple set of predictions and corresponding class labels.

Usage

data(ROCR.simple)

Arguments

Format

A two element list. The first element, ROCR.simple$predictions, is a vector of numerical predictions. The second element, ROCR.simple$labels, is a vector of corresponding class labels.

Examples

Run this code
# NOT RUN {
# plot a ROC curve for a single prediction run
# and color the curve according to cutoff.
library(ROCR)
data(ROCR.simple)
pred <- prediction(ROCR.simple$predictions, ROCR.simple$labels)
pred
perf <- performance(pred,"tpr","fpr")
perf
plot(perf,colorize=TRUE)
# }

Run the code above in your browser using DataCamp Workspace