Learn R Programming

EGAD (version 1.0.3)

get_roc: Build receiver operating characteristic curve

Description

The function calculates the FPR and TRPR for the receiver operating characteristic (ROC)

Usage

get_roc(scores, labels)

Arguments

scores
numeric array
labels
binary array

Value

FPR,TPR numeric arrays

Examples

Run this code
labels <- c(rep(0,10))
labels[c(1,3,5)] <- 1 
scores <- 10:1
roc <- get_roc(scores, labels)



Run the code above in your browser using DataLab