calc_roc: Calculate ROC curve metrics (two-class case)

Description Usage Arguments Value

View source: R/accuracy_fncs.R

Description

Calcluates the trade-off between true positive rate (tpr) and false discovery rate (fdr), true negative rate (tnr), and overall accuracy for a set of threshold probabilities.

Usage

1
calc_roc(pred_vec, labels, thresholds = seq(0.01, 1, 0.01))

Arguments

pred_vec

A numeric vector of predicted probabilities

labels

A factor vector of class labels (must use TRUE and FALSE)

threshholds

a numeric of threshholds to test.

Value

a three column matrix with the true positive rate (tpr), false discovery, rate (fdr), and true negative rate (tnr) associated with each threshold value.


alexWhitworth/glmEnsemble documentation built on Nov. 5, 2021, 6:55 a.m.