auroc_aupr: Function to fetch score of AUROC and AUPR

Description Usage Arguments Value See Also Examples

View source: R/auroc_aupr.R

Description

This function computes the value of AUROC and AUPR at the same time

Usage

1
auroc_aupr(scores, labels, mode = "both")

Arguments

scores

A numeric dataset of predicted scores, a vector

labels

A numeric, character, logical, or factor dataset of observed labels

mode

A string that specifies the types of evaluation measures that the evalmod function calculates, roc, pr, both. the default is both.

Value

value of computed scores of roc or prc.

See Also

evalmod

Examples

1
2
3
x <- c(0.1, 0.5, 0.6, 0.2)
y <- factor(c('yes','no','yes','no'))
auroc_aupr(scores = x, labels = y)

Ronlee12355/dfbmd documentation built on Sept. 23, 2020, 10:32 a.m.