Learn R Programming

ROCket (version 1.0.3)

rkt_roc: Empirical estimate of the ROC

Description

Calculate the empirical estimate of the ROC from raw sample or aggregated data.

Usage

rkt_roc(prep, method = 1)

# S3 method for rkt_roc print(x, ...)

# S3 method for rkt_roc plot(x, ...)

Value

An object of class rkt_roc, i.e. a function or a list of two functions (for method = 1).

Arguments

prep

A rkt_prep object.

method

A number specifying the type of ROC estimate. Possible values can be viewed with show_methods().

x

An object of class rkt_roc.

...

Further parameters passed to plot and lines

Examples

Run this code
require(ROCket)

scores <- c(1, 2, 3, 4)
positives <- c(0, 1, 0, 1)
prep <- rkt_prep(scores, positives)

roc1 <- rkt_roc(prep, method = 1)
roc2 <- rkt_roc(prep, method = 2)
roc3 <- rkt_roc(prep, method = 3)

plot(roc1)
plot(roc2)
plot(roc3)

Run the code above in your browser using DataLab