Learn R Programming

enrichvs (version 0.0.3)

auc: The Area Under the ROC Curve (AUC)

Description

This program calculate AUC for virtual screening

Usage

auc(x, y, decreasing=TRUE)

Arguments

x
a vector for scores
y
a vector for labels
decreasing
TRUE if the compounds are ranked by decreasing score

Value

  • return a value, AUC

References

Truchon et al. Evaluating Virtual Screening Methods: Good and Bad Metrics for the "Early Recognition" Problem. J. Chem. Inf. Model. (2007) 47, 488-508.

Examples

Run this code
x <- rnorm(1000)  # random scores for 1000 compounds
y <- c(rep(1,50), rep(0,950))     # activity labels for "x"
auc(x, y)

data(dud_egfr)
auc(dud_egfr[,1], dud_egfr[,2], decreasing=FALSE)

Run the code above in your browser using DataLab