https://github.com/cadam00/lightauc
Fast AUC Computation
https://github.com/cadam00/lightauc
auc efficiency fast r r-package rcpp rcppparallel speed
Last synced: about 1 month ago
JSON representation
Fast AUC Computation
- Host: GitHub
- URL: https://github.com/cadam00/lightauc
- Owner: cadam00
- License: gpl-3.0
- Created: 2025-02-01T07:24:02.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-11T09:15:21.000Z (3 months ago)
- Last Synced: 2025-03-22T08:44:20.553Z (2 months ago)
- Topics: auc, efficiency, fast, r, r-package, rcpp, rcppparallel, speed
- Language: C++
- Homepage: https://cadam00.github.io/lightAUC/
- Size: 3.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://CRAN.R-project.org/package=lightAUC)
[](https://github.com/cadam00/lightAUC)
[](https://github.com/cadam00/lightAUC/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/cadam00/lightAUC)# **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](#ref-fawcett2006)).## **Install**
The official [(CRAN)](https://cran.r-project.org/) version of the package can be
installed using
``` r
install.packages("lightAUC")
```Alternatively, the development version of the package can be installed via
``` r
if (!require(remotes)) install.packages("remotes")
remotes::install_github("cadam00/lightAUC")
```## **Citation**
To cite the official [(CRAN)](https://cran.r-project.org/) version of the
package, please useAdam, C. (2025). lightAUC: Fast AUC Computation. R package version 0.1.2.
doi:10.32614/CRAN.package.lightAUC## **Example**
```r
# Create some data
probs <- c(1, 0.4, 0.8)
actuals <- c(0, 0, 1)
lightAUC(probs, actuals)
```
```
## 0.5
```For parallel calculations use:
```r
# 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