Metadata-Version: 2.4
Name: rocci
Version: 0.3.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Typing :: Typed
Requires-Dist: numpy>=1.24
Requires-Dist: matplotlib>=3.7 ; extra == 'plot'
Provides-Extra: plot
License-File: LICENSE
Summary: Distribution-free simultaneous confidence bands for ROC curves
Keywords: roc,confidence-band,bootstrap,auc,classification
Author-email: "N. Delaney-Busch" <ndelaneybusch@gmail.com>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/ndelaneybusch/rocci/blob/main/CHANGELOG.md
Project-URL: Documentation, https://ndelaneybusch.github.io/rocci
Project-URL: Homepage, https://github.com/ndelaneybusch/rocci
Project-URL: Repository, https://github.com/ndelaneybusch/rocci

# rocci

[![PyPI](https://img.shields.io/pypi/v/rocci)](https://pypi.org/project/rocci/)
[![Python versions](https://img.shields.io/pypi/pyversions/rocci)](https://pypi.org/project/rocci/)
[![CI](https://github.com/ndelaneybusch/rocci/actions/workflows/ci.yml/badge.svg)](https://github.com/ndelaneybusch/rocci/actions/workflows/ci.yml)
[![Merge gates](https://github.com/ndelaneybusch/rocci/actions/workflows/gates.yml/badge.svg)](https://github.com/ndelaneybusch/rocci/actions/workflows/gates.yml)
[![coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/ndelaneybusch/c2865a0da1db40e24976b7c721a4ca97/raw/rocci-coverage.json)](https://github.com/ndelaneybusch/rocci/actions/workflows/ci.yml)
[![Docs](https://img.shields.io/badge/docs-latest-blue)](https://ndelaneybusch.github.io/rocci)
[![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/ndelaneybusch/rocci/blob/main/LICENSE)

**Distribution-free simultaneous confidence bands for ROC curves.**

`rocci` is a simple interface to easily add uncertainty estimates to your ROC
curve. It draws a simultaneous confidence band, which maintains the specified
confidence of capturing the _entire_ true (population) ROC. `rocci` uses a new
nonparametric method by default that is likely to work with nearly all common
data distributions.

```python
from rocci import roc_band

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

## Why rocci

`rocci` is designed to:
- __just work__. It does 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__. A rust backend blazes through the algorithm.
- __make a minimal footprint__. The only hard dependency is numpy.
- __clear an unreasonably high bar of rigor__. Method is validated with
  [millions of simulations across diverse data
  sets](https://ndelaneybusch.github.io/rocci/method/simulations/),
  implementation is [verified with exacting
  tests](https://ndelaneybusch.github.io/rocci/latest/method/verification/).
- __support an open ecosystem__. Permissive MIT license, easy extensibility.

If you are comfortable adding a normality assumption to get tighter bands,
`rocci` yields the tighter "Working-Hotelling" band, but also carefully checks
the normality assumption and warns you when it looks dicey.

## Installation

```bash
pip install rocci            # prebuilt wheels (no need for rust toolchain)

# optional plotting support
pip install 'rocci[plot]'

```

Details in the [installation guide](https://ndelaneybusch.github.io/rocci/getting-started/installation/).

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

