rkt_roc: Empirical estimate of the ROC

Description Usage Arguments Value Examples

View source: R/rkt_roc.R

Description

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

Usage

1
2
3
4
5
6
7
rkt_roc(prep, method = 1)

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

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

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

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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)

da-zar/ROCket documentation built on Feb. 26, 2021, 12:09 p.m.