Repository navigation
Conversation
the fallback branch overwrote `best` on every qualifying threshold, so it kept the highest one. coverage is non-increasing in t, so that is always the lowest-coverage candidate. break on the first match instead. fixes adrida#77
ben564885
force-pushed
the
fix/calibrate-threshold-max-coverage
branch
from
July 31, 2026 07:48
58f73b7 to
97b83d2
Compare
Repository owner
deleted a comment from
tarun101
Aug 17, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #77.
the single-set fallback branch of
_calibrate_thresholdoverwrotebeston every threshold that cleared the clopper-pearson bound, so it kept the highest one. coverage is monotonically non-increasing int, so that is always the lowest-coverage candidate — the opposite of what the inline comment claimed.breakon the first match instead. every candidate in the loop already passes the same gate at the same alpha, so this recovers coverage without touching the guarantee.before / after on the repro in #77: coverage 30.6% -> 91.7%.
across 15 fit configs the deployed policy changed in 9 (e.g. 31.4% -> 91.4%), with measured live teacher agreement staying at or above target in every case.
two regression tests added. both fail on main with the exact numbers above and pass here. full suite: 129 passed, 3 skipped.