Fast AUC Computation

Fast calculation of Area Under Curve (AUC) metric of a Receiver Operating Characteristic (ROC) curve, using the algorithm of Fawcett (2006) . Therefore it is appropriate for large-scale AUC metric calculations.


CRAN status Developmental version R-CMD-check Codecov test coverage

Fast AUC computation in R

Fast and lightweight computation of AUC metric for the binary case (1 positive and 0 negative) is offered by lightAUC package. The algorithm used is a fast implementation from algorithm of Fawcett (2006).

Install

The official (CRAN) version of the package can be installed using

install.packages("lightAUC")

Alternatively, the development version of the package can be installed via

if (!require(remotes)) install.packages("remotes")
remotes::install_github("cadam00/lightAUC")

Citation

To cite the official (CRAN) version of the package, please use

Adam, C. (2025). lightAUC: Fast AUC Computation. R package version 0.1.3. doi:10.32614/CRAN.package.lightAUC

Example

# Create some data
probs   <- c(1, 0.4, 0.8)
actuals <- c(0, 0, 1)
lightAUC(probs, actuals)
## 0.5

For parallel calculations use:

# E.g. 2 cores (you can use cores = parallel::detectCores() for your case)
probs   <- c(1, 0.4, 0.8)
actuals <- c(0, 0, 1)
lightAUC(probs, actuals, parallel = TRUE, cores = 2)
## 0.5

References

Fawcett, T. (2006). An introduction to ROC analysis. Pattern Recognition Letters, 27(8), 861–874. doi:10.1016/j.patrec.2005.10.010

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("lightAUC")

0.1.3 by Christos Adam, a year ago


https://github.com/cadam00/lightAUC, https://cadam00.github.io/lightAUC/


Report a bug at https://github.com/cadam00/lightAUC/issues


Browse source code at https://github.com/cran/lightAUC


Authors: Christos Adam [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports Rcpp, RcppParallel

Suggests Rfast, Rfast2, knitr, rmarkdown, testthat

Linking to Rcpp, RcppArmadillo, RcppParallel

System requirements: GNU make


Suggested by rtemis.


See at CRAN