Valeri's decisions (1) competitors from the library, (2) variant a. (1) Chandrupatla is scipy.optimize.elementwise.find_root, Brent is brentq, no more per-problem best_of. Our Chandrupatla stopped on a bracket twice as wide as every other method (the factor the protocol corrects for ITP); fixed (+0.5*xtol) in baselines.py and in the two copies found by grep (stage16_blend, stage19_modern) and the traced mirror, and pinned: ours == library on every problem. Regenerating sweep_full.json changed exactly three rows - chandrupatla APS 2785->2787, CHA 2423->2441, brent CHA 4099->4115 - and nothing else (diff_sweeps.py: 0 unexpected).
(2) The proposed method is again the scheduled projection (2806/3220/6026), its budget multiplier DECLARED as the one free constant: the canonical total is the same for every multiplier 1.25-4, the wide-bracket one is not. The earned projection is the constant-free variant (3568/3020/6588). What the old tables hid: problem by problem the proposed rule beats Chandrupatla on the canonical set 87/24/42, exact sign test p = 9e-5, while trailing him by 0.7% in total; on the wide-bracket set he is genuinely stronger (26 to 9, p = 0.006). Gap decomposition recomputed with the library: 244 (was 262), 160 of it on the flat families (two thirds), fun1 58 (a quarter, not a third as the abstract said). Also corrected on the way: the 'subsumed by Chandrupatla' pin claimed he is better on the worst single problem - true only with the looser tolerance (84 against the credit rule's 83 once fixed); §8.3 still called zero slack degenerate, which Table 1a refutes; §5.2's Brent figure is our pure-Python implementation and now says so. verify_article.py 286/286, 802 tests pass twice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,10 +168,13 @@ def test_charged_totals_are_what_section_5_reports():
|
||||
root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
with open(os.path.join(root, "sweep_full.json"), encoding="utf8") as fh:
|
||||
rows = {r["label"]: r for r in json.load(fh)}
|
||||
# brent is now run at the better of ours and scipy.brentq per problem,
|
||||
# which is why it is 6988 rather than the 6991 of our implementation alone
|
||||
# since 2026-09-21 the competitors are the library alone: brent is
|
||||
# scipy.brentq (7004; our pure-Python implementation, timed in section 5.2,
|
||||
# is 6991) and chandrupatla is scipy's elementwise.find_root (5228; the
|
||||
# earlier 5208 came from a per-problem best of ours and the library, with
|
||||
# ours stopping on a bracket twice as wide)
|
||||
for lbl, want in (("pure.ratio.derived3.project", 6026),
|
||||
("brent", 6988), ("bisection", 10620),
|
||||
("chandrupatla", 5208)):
|
||||
("brent", 7004), ("bisection", 10620),
|
||||
("chandrupatla", 5228)):
|
||||
got = rows[lbl]["APS"]["total"] + rows[lbl]["CHA"]["total"]
|
||||
assert got == want, (lbl, got, want)
|
||||
|
||||
Reference in New Issue
Block a user