fastroc
fastroc is a module that is able to approximate the ROC AUC score over an axis of two numpy arrays much faster than current alternatives. It does this at the expense of portability as it uses C to calculate the ROC AUC.
Usage
To calculate the ROC AUC score, 2 arrays are needed:
y_true- Whether that event actually happenedy_score- The model's score of that event happening. The lower, the more likely.y_scoreshould be in the range 0 to 1.
The function also takes in 3 optional arguments:
axis(default-1) - Which axis to compute the score overintegral_precision(default50) - The number of samples to use for the integrationthread_count(default1) - The number of threads to use. A value of 1 keeps the program single threaded.
The array returned contains the roc scores.
Building
First run:
git clone https://github.com/brightlego/fastroc.git
cd fastroc
Then run:
Linux:
To build and install with you default Python3 installation, run
bash build.sh
Other
To build and install with another Python3 installation or on MacOS/Windows, run
<python-installation> -m build
<python-installation> -m pip install "$(ls dist/*.whl | sort -V | tail -n 1)" --force-reinstall
Notes for Windows:
This code is not tested on Windows and is unlikely to be able to use multithreading.
Metadata
Release files for fastroc 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastroc-1.1.3.tar.gz | 7.5 kB | Without provenance | Details for fastroc-1.1.3.tar.gz |
Release files / fastroc-1.1.3.tar.gz
| Download URL | fastroc-1.1.3.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6c1b659b7dac75e52a19aecd4701d8fedc605a06b05425f65468daad4de5267
|
|
BLAKE2b-256 checksum How to use checksums |
8561b884bec7c7d3490ef72cf071aa50977765c50ebdf80b92ea360cf499f5af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.1
|
Security for fastroc 1.1.3
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.