Skip to main content

Python tools for working with the AUROC

Project description

pyroc is a package for analyzing receiver operator characteristic (ROC) curves. It includes the ability to statistically compare the area under the ROC (AUROC) for two or more classifiers.

Quick start

Install:

pip install pyroc

Use:

import pyroc import numpy as np

pred = np.random.rand(100) target = np.round(pred) # flip 10% of labels target[0:10] = 1 - target[0:10] W = pyroc.auroc(target, pred)

# second prediction pred2 = pred pred2[10:20] = 1 - pred2[10:20] auroc, ci = pyroc.auroc_ci(target, [pred, pred2]) print(auroc) print(ci)

Documentation

Documentation is available on readthedocs. An executable demonstration of the package is available on GitHub as a Jupyter Notebook.

Installation

To install the package with pip, run:

pip install pyroc

To install this package with conda, run:

conda install -c conda-forge pyroc

Project details


Release history Release notifications

Download files

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

Files for pyroc, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size pyroc-0.1.0-py3-none-any.whl (6.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pyroc-0.1.0.tar.gz (5.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page