SCoRE
SCoRE implements conformal selective prediction procedures for marginal deployment risk (MDR) and selective deployment risk (SDR) control.
This repository also contains the simulation and application code used for the paper Conformal Selective Prediction with General Risk Control.
Installation
Install the package from a local checkout:
python -m pip install -e .
Install optional dependencies for the research scripts:
python -m pip install -e ".[experiments]"
After the package is published, install it with:
python -m pip install score-select
Quickstart
import numpy as np
from SCoRE import SCoRE_MDR, SCoRE_SDR
lcalib = np.array([0, 1, 0, 1])
scalib = np.array([0.1, 0.4, 0.2, 0.8])
stest = np.array([0.15, 0.5, 0.9])
dcalib = (lcalib, scalib)
dtest = stest
mdr_selected = SCoRE_MDR(dcalib, dtest, alpha=0.5, gamma=0.5)
sdr_selected = SCoRE_SDR(dcalib, dtest, alpha=0.5, gamma=0.5)
Functions return NumPy integer index arrays, so selections can be used directly to index NumPy arrays.
When using randomized pruning, pass random_state for reproducible results:
selected = SCoRE_SDR(
dcalib,
dtest,
alpha=0.5,
gamma=1.0,
prune="hete",
random_state=123,
)
Public API
The top-level package exports the main procedures and utilities:
Recommended package entry points:
SCoRE_MDRSCoRE_SDR
Additional utilities:
CSSCoRE_MDR_bf,SCoRE_MDR_w,SCoRE_SDR_wBH,eBHeval_MDR,eval_SDRloss_Jin2023,loss_1,loss_2gen_data_Jin2023,gen_data_1,gen_data_2Lpredictor
Repository Layout
SCoRE/: installable Python packagetests/: package testsapplications/: real-data applicationsapplications/drug/: efficient, cost-aware drug discoveryapplications/icu/: clinical prediction error managementapplications/llm/: flexible LLM abstention
simulation/: simulation experimentssimulation_w/: simulation experiments with covariate shifts
Metadata
Release files for score-select 0.1.1
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 |
|---|---|---|---|---|
| score_select-0.1.1.tar.gz | 11.9 kB | Without provenance | Details for score_select-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| score_select-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for score_select-0.1.1-py3-none-any.whl |
Total release size: 22.1 kB
Release files / score_select-0.1.1.tar.gz
| Download URL | score_select-0.1.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3255ca113cca5b1aaf98fe6e162e83d42b98803cbb717499aae2995ddf46e1b5
|
|
BLAKE2b-256 checksum How to use checksums |
e6c10a31fb22f52960bdb69ed02be7744b691e5e393942e810049302c5e663d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / score_select-0.1.1-py3-none-any.whl
| Download URL | score_select-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b38900a4d2e30916f70b7d942929d84ba559b0017e562fb59d7f4758113fc2f3
|
|
BLAKE2b-256 checksum How to use checksums |
2ac5e59a8b5097f07ab9413dbb6277342af46bc8c167a15e0494400fc4d8dcc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for score-select 0.1.1
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.