Repository navigation
feat(calibration): wire stateless split conformal prediction sets into bench-calibration and policy_calibration.py - #36
jigyasujuneja wants to merge 3 commits into
Conversation
76fe7d1 to
d1e489a
Compare
|
Refactored and split onto
|
|
Live check of split conformal sets on a hosted model (results only) Setup:
Results:
Note: this used a port of the earlier implementation, checked equal to its Go code, with no caller priors. The LAC figures don't depend on the tie-breaking or the RAPS defaults changed in this PR. Suggestion for the new docs section: describe conformal sets as a coverage-targeted option that can escalate considerably more on wide option sets, rather than as a replacement for the hesitation cut-off. |
85bb2f3 to
5ad4c84
Compare
|
Thanks for running the live
|
…ibration and policy_calibration.py - Add stateless split conformal prediction primitives (lac, aps, raps) in pkg/client/conformal.go with HMAC-SHA256 deterministic tie-breaking and pre-fusion RawProbabilities evaluation (zero mutable package globals). - Wire --conformal (lac|aps|raps) and --conformal-alpha into dgem bench-calibration using the existing 5-fold SHA-1 held-out split in cmd/temperature_fit.go. - Add matching --conformal and --conformal-alpha 5-fold reporting to scripts/policy_calibration.py and document usage in docs/confidence/calibrate-your-policy.md.
|
Thanks for sharing the live G4 conformal evaluation across CLINC150 ( Your observation captures the exact root cause of the
Updates in
|
5ad4c84 to
f708744
Compare
|
Follow-up note from the
|
|
Thanks for adding Based on the live hosted G4 evaluation across If we later evaluate OOF-temperature-scaled conformal shortlists live on G4 as part of a two-stage wide-taxonomy router and confirm a clear end-to-end gain over |
Summary
Splits PR #36 into two single-purpose PRs (moving the 8-slot context pruning template and knapsack example into #59) and wires stateless split conformal prediction sets end to end across
dgem bench-calibration,scripts/policy_calibration.py, and the calibration docs:pkg/client/conformal.go):lac( - p_y$),aps, andraps({\text{reg}}=1, \lambda_{\text{reg}}=0.01$ default).HMAC-SHA256(seed_key, item_key)tie-breaking and evaluates on pre-fusionRawProbabilitieswhen present so caller priors cannot mask ambiguity.dgem bench-calibration --conformal lac|aps|raps --conformal-alpha 0.10(cmd/bench_calibration.go,cmd/conformal_fit.go): computes 5-fold held-out conformal quantiles using the same SHA-1 fold split as--auto-temperatureand reports empirical coverage, mean set size, singleton rate, and escalation rate.scripts/policy_calibration.py --conformal lac|aps|raps --conformal-alpha 0.10: computes matching 5-fold out-of-sample conformal metrics on dataset-runner JSONL receipts.docs/confidence/calibrate-your-policy.md(synced todocs-site/).Verification
env -u DGEM_VERTEX_URL go vet ./...env -u DGEM_VERTEX_URL go test -race ./cmd/... ./pkg/...python3 -m unittest -v scripts/test_policy_calibration.pypython3 scripts/docs_sync_check.py && python3 scripts/docs_link_check.py