Assured Prediction: Integration
Product API
from assured_prediction import AssuredFilter
# Calibrate epsilon to retain 50% of samples (most confident half)
probs = model.predict_proba(batch)
filt = AssuredFilter.from_coverage(probs, coverage=0.5)
result = filt.apply_probs(probs)
print(result.coverage, result.accepted)
# accepted rows → auto-decision; rejected → human reviewMechanism
- Compute H = −Σ pᵢ log(pᵢ) per prediction
- Set ε threshold calibrated to target coverage (e.g. 50%)
- Entropy below ε → accept (high confidence)
- Entropy above ε → reject (route to human / fallback)
Coverage calibration is accurate: request 50%, get ~50%. No held-out calibration set required.