Learn R Programming

logicDT (version 1.0.5)

calcAUC: Fast computation of the AUC w.r.t. to the ROC

Description

This function computes the area under the receiver operating characteristic curve.

Usage

calcAUC(preds, y, fast = TRUE, sorted = FALSE)

Value

The AUC between 0 and 1

Arguments

preds

Numeric vector of predicted scores

y

True binary outcomes coded as 0 or 1. Must be an integer vector.

fast

Shall the computation be as fast as possible?

sorted

Are the predicted scores already sorted increasingly? If so, this can slightly speed up the computation.