Skip to main content

Distribution-free simultaneous confidence bands for ROC curves

Project description

rocci

PyPI Python versions CI Merge gates coverage Docs License

Distribution-free simultaneous confidence bands for ROC curves.

rocci envelope band vs Working-Hotelling band on heavy-tailed scores

rocci is a simple interface to easily add uncertainty estimates to your ROC curve that are very likely to be correct in nearly all use cases. It draws a simultaneous confidence band, which maintains the specified confidence of capturing the entire true (population) ROC.

rocci is designed to:

  • just work. It should do the right thing off the shelf for nearly any data set.
  • drop in to your workflow. It natively integrates with sklearn, torch, statsmodels, PyMC/arviz, and pandas/polars data.
  • be fast. Core operations are implemented in rust for speed (invisible to the user).
  • have a lightweight footprint. Minimal runtime dependencies (just numpy and scipy).
  • support an open ecosystem. Permissive MIT license, easy extensibility.

By default, rocci uses a distribution-free method that provides informative bands without burdensome assumptions about the data. It maintains nominal coverage in a huge variety of contexts and the rare violations tend to be small misses — validated in a 2.25M-evaluation simulation study across Gaussian, heavy-tailed, skewed, and multimodal score distributions (see the validation repository and the docs' walkthrough of its conclusions). If you are comfortable adding a normality assumption to get tighter bands, rocci yields a "Working-Hotelling" band, but also carefully checks the normality assumption and warns you when it looks dicey.

Installation

pip install rocci            # prebuilt wheels — no Rust toolchain needed
pip install 'rocci[plot]'    # + matplotlib for band.plot() and diagnostics
uv add rocci                 # in uv-managed projects

Wheels cover Linux (glibc x86-64/aarch64 and musl), macOS (Intel and Apple silicon), and Windows, for every Python ≥ 3.10; runtime dependencies are numpy and scipy only. On any other platform pip falls back to the sdist (requires a Rust toolchain), and if no compiled kernel is present at runtime a pure-NumPy backend with identical statistical semantics takes over automatically. There is no conda package at present: the wheel is lightweight and self-contained, so pip install rocci works cleanly inside conda environments. Details: installation guide.

Quickstart

from rocci import roc_band

band = roc_band(y_true, y_score)
band.plot()
print(band.summary())

Docs: https://ndelaneybusch.github.io/rocci · Changelog: CHANGELOG.md · Contributing (including the release process): CONTRIBUTING.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rocci-0.2.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rocci-0.2.0-cp310-abi3-win_amd64.whl (231.1 kB view details)

Uploaded CPython 3.10+Windows x86-64

rocci-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl (583.2 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

rocci-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (370.6 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

rocci-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (371.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

rocci-0.2.0-cp310-abi3-macosx_11_0_arm64.whl (331.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

rocci-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl (334.8 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file rocci-0.2.0.tar.gz.

File metadata

  • Download URL: rocci-0.2.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rocci-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8bed7781461e7db7e0de92748aa21d65503b8a78124c9227b7cc53adc64c7847
MD5 1a823318661aa17558d2c12cc5d6ed0b
BLAKE2b-256 db6586c3a8218fef5eb6055a53f5c2c1e7d0a3c277cc6873a4cc1975979f2d1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocci-0.2.0.tar.gz:

Publisher: wheels.yml on ndelaneybusch/rocci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rocci-0.2.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: rocci-0.2.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 231.1 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rocci-0.2.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 125b4b7cbbffcda7cfdcdf0e92a3c3de6a6bed6bf1aacc3d7a8a8227e8c0fb0b
MD5 2dcbc8f52a3a4b0e84c6f45c3f1ca417
BLAKE2b-256 38f4966386dc61b4bcbfa9bd778408382e869599a33b0bbc0551d1d46ddb1f49

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocci-0.2.0-cp310-abi3-win_amd64.whl:

Publisher: wheels.yml on ndelaneybusch/rocci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rocci-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rocci-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 85fbfe47e661f0e85654a71eb2d7804be25e6119c3ee1c3fa5f437a35fafdb3c
MD5 1939fcb42b3c866e2e834ae20c6c4bdb
BLAKE2b-256 dbe85fe613cfb9cca16fb19acc3ca409652337e5f2083881683fac0e6f013dad

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocci-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: wheels.yml on ndelaneybusch/rocci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rocci-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rocci-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27c91f4dcd50f0c8e3bfcfa26e4213d09ed8c8d1c91ebf88e002abb23ac99606
MD5 34382a947b38ad4b869a186d7c2b6692
BLAKE2b-256 81ff38f9b97226632e0d0887cb58d1511993fbcddd4a0481fd1c1f258a22db73

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocci-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on ndelaneybusch/rocci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rocci-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rocci-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d7fa5664f434eb1f47ae416a79a7c7755704d29792d3e6e2c8c1e90782f51a3c
MD5 e75faa10e3765f08883dcb908f4f8e0e
BLAKE2b-256 c48e08f3079bba41be097fcf858e9ead7366fe5635274651294220b37a027b7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocci-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on ndelaneybusch/rocci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rocci-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: rocci-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 331.6 kB
  • Tags: CPython 3.10+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rocci-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 959b29738cdf2a6d1d8a05ed93f1e43a55cb77348c9fc8f01c6b59db5c9e4170
MD5 4b25490c7fd6fb85bfc22fd3c4e26b47
BLAKE2b-256 3faaaa22e789078b6d3fc84d83cf46e32f8ea48cc4514309b8efcb902903ef5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocci-0.2.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on ndelaneybusch/rocci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rocci-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rocci-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 402c5f2113040463fe849345269891d2cb70e52c4844d84d303493406e19d229
MD5 461cdb4cac0d2d15fe244e321fd17da9
BLAKE2b-256 55a9d2ebebb694fac182b42f5d1b0842c2adea9d5b746afa4d03ceb24a576b85

See more details on using hashes here.

Provenance

The following attestation bundles were made for rocci-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: wheels.yml on ndelaneybusch/rocci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page