Skip to content

Conformal selection (FDR-controlled screening)

Shortlist test candidates whose unobserved continuous outcome exceeds a target threshold while rigorously controlling the finite-sample False Discovery Rate (FDR).

Use it when You are screening candidates (drug discovery, credit underwriting, hiring, lead scoring) and want to select those with \(Y_j > c_j\) at a controlled false discovery rate.
Guarantee Exact finite-sample \(\mathrm{FDR} \le q\) via clipped monotone conformal p-values and Benjamini–Hochberg under exchangeability.
In the library ConformalSelector
Source Jin and Candès (JMLR 2023)
Example needs pyconformal

Finite-sample FDR guarantee

Using clipped monotone scores \(V_i = c_i - \hat{f}(X_i)\) for null calibration points (\(Y_i \le c_i\)) and \(+\infty\) otherwise, ConformalSelector computes exact conformal p-values $\(p_j = \frac{1 + \#\{i : V_i \le c_j - \hat{f}(X_j)\}}{n + 1}\)$ and applies Benjamini–Hochberg at level fdr, guaranteeing \(\mathrm{FDR} \le \text{fdr}\) in finite samples.

Minimal example

Copy, paste, run.

import numpy as np
from pyconformal import ConformalSelector
from pyconformal.point_models import Ridge

rng = np.random.default_rng(0)
X = rng.normal(size=(1200, 3))
y = X @ np.array([1.5, -0.8, 0.6]) + rng.normal(0.0, 0.7, size=1200)

model = Ridge(alpha=1.0).fit(X[:400], y[:400])
sel = ConformalSelector(model, fdr=0.10, threshold=1.5, direction="above")
sel.calibrate(X[400:800], y[400:800])

chosen = sel.select(X[800:])
true_pos = y[800:] > 1.5
fdp = np.sum(chosen & ~true_pos) / max(int(chosen.sum()), 1)
print(f"selected: {chosen.sum()}  empirical FDP: {fdp:.3f}  recall: {np.sum(chosen & true_pos) / true_pos.sum():.3f}")

More