A package for comparing ROC AUC scores using DeLong's method.
Project description
rocauc_comparison
rocauc_comparison is a Python package designed for comparing Receiver Operating Characteristic (ROC) Area Under the Curve (AUC) scores using DeLong's method. This package provides a statistical test to determine if the difference between two ROC AUC scores is statistically significant.
Features
- Compare Two ROC AUC Scores: Use DeLong's test to compare the ROC AUC scores of two models.
- Calculate AUC Variance: Compute the variance of a single ROC AUC score using DeLong's method.
- Fast and Efficient: Implemented with optimized numpy operations for efficient computation.
Installation
You can install the package using pip:
pip install rocauc_comparison
import numpy as np
from rocauc_comparison import delong_roc_test
# Ground truth labels
ground_truth = np.array([0, 1, 0, 1, 0, 1])
# Predictions from the first model
predictions_one = np.array([0.1, 0.4, 0.35, 0.8, 0.5, 0.9])
# Predictions from the second model
predictions_two = np.array([0.05, 0.45, 0.3, 0.7, 0.6, 0.85])
# Calculate the p-value for the difference in AUC
p_value = delong_roc_test(ground_truth, predictions_one, predictions_two)
print(f"p-value: {p_value}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rocauc_comparison-0.1.tar.gz.
File metadata
- Download URL: rocauc_comparison-0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52d34e1d2cb61f9aa03f51d327c2543e953fd1858a52ced9e265a7e5efd13b30
|
|
| MD5 |
46fc0d504bc7af5e8fa15b6f20498723
|
|
| BLAKE2b-256 |
db9c7f974e023a1229050896e89f07528b472a35bdc4736514a7cc5c1dae5545
|
File details
Details for the file rocauc_comparison-0.1-py3-none-any.whl.
File metadata
- Download URL: rocauc_comparison-0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a0d309a0c12e209cd1e305632e9e9e7fd5dae4b92e865de217e1f61765bf165
|
|
| MD5 |
7604e429288017224b148f0d7d1a3ea4
|
|
| BLAKE2b-256 |
c30eaac148389a34e237a79c8741184fb2ef16eb03cfa2228c7f07936d0e6a6d
|