Skip to main content

pAUC Logo

pAUC: A simple Python package to calculate ROC AUC confidence intervals using DeLong’s method


PyPI Python Python Tests Repo Size


📌 Installation

pip install pauc

📌 Quick Usage

from pauc import roc_auc_ci_score
import numpy as np

y_true = np.array([0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1])
y_pred = np.array([0.1, 0.35, 0.24, 0.8, 0.2, 0.85, 0.13, 0.85, 0.74, 0.58, 0.71, 0.25])

auc, (lb, ub) = roc_auc_ci_score(y_true, y_pred)
print(f'AUC: {auc:.3f}, 95% CI: ({lb:.3f}, {ub:.3f})')
AUC: 0.708
95% CI: (0.378, 1.000)

📌 Comparing Two Models

from pauc.roc_auc_ci import delong_roc_test
import numpy as np

y_true = np.array([0, 0, 1, 1, 0, 1, 0])
pred1 = np.array([0.1, 0.35, 0.4, 0.8, 0.2, 0.75, 0.1])
pred2 = np.array([0.5, 0.92, 0.1, 0.1, 0.8, 0.95, 0.9])

log_pval = delong_roc_test(y_true, pred1, pred2)
p_value = 10 ** log_pval
print(f"DeLong’s test p-value: {p_value}")

📌 Why DeLong’s Test?

DeLong’s method (DeLong et al. 1988, Sun and Xu 2014) is:

  • 📈 Statistically robust and widely used
  • ✅ Ideal for estimating AUC confidence intervals
  • 🔁 Suitable for comparing correlated ROC curves

📌 Citation

If you use pAUC, please cite:

  • DeLong et al., Biometrics, 1988:
    Comparing the areas under two or more correlated ROC curves: a nonparametric approach

  • Sun & Xu, IEEE Signal Processing Letters, 2014:
    Fast Implementation of DeLong’s Algorithm for Comparing the Areas Under Correlated ROC Curves


📌 License

Released under the MIT License.


✨ Enjoy using pAUC for statistically sound AUC comparisons!

Metadata

Release files for pauc 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pauc 0.1.4
File Size Uploaded Provenance Actions
pauc-0.1.4.tar.gz 6.1 kB Without provenance Details for pauc-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pauc 0.1.4
File Interpreter ABI Platform Actions
pauc-0.1.4-py3-none-any.whl Python 3 none any Details for pauc-0.1.4-py3-none-any.whl

Total release size: 12.8 kB

Release files / pauc-0.1.4.tar.gz

Download URL pauc-0.1.4.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2ac16464a9004d02f3cc31307c2f2e57401e2de70145be2608c1f8da6409a856
BLAKE2b-256 checksum
How to use checksums
d5564e6e537fcf2c3ba2e1ae001e45937fa984b56733269166654db01bdb99fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / pauc-0.1.4-py3-none-any.whl

Download URL pauc-0.1.4-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b26dec6d8d14ec985c1318e65cf7d5a9d2f6a2f6e06320b751f8e9568dfadbc
BLAKE2b-256 checksum
How to use checksums
dff6719d7b8d9502956c3f9ea2b8b78bbbe1c8a9f641a52c21596a0c18c1c9f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Security for pauc 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page