pmut.auc: Calculate Model Prediction AUC with Visulization

Description Usage Arguments Value Examples

View source: R/pmut.auc.R

Description

This function calculates area under the ROC curve for model prediction, without any package dependency.

Usage

1
pmut.auc(aa, pp, plot = FALSE)

Arguments

aa

Vector of actuals, could be non-binary, but all non-zero will be treated as TRUE

pp

Vector of predictions, could be any value, probability is most ideal

plot

Logical (defualt is FALSE), TRUE indicates plotting the auc curve

Value

A single numeric value for auc

Examples

1
2
3
actuals = c(1,1,1,1,0,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0)
predicts = rev(seq_along(actuals)); predicts[9:10] = mean(predicts[9:10])
pmut.auc(actuals, predicts, plot=TRUE)

chengjunhou/pmut documentation built on May 23, 2019, 4:24 p.m.