Repository navigation
refactor(OnlineLearning/MistakeBound): online-to-batch review follow-ups - #5046
SamuelSchlesinger wants to merge 1 commit into
Conversation
Follow-up to #4932 review nits (review-c, jrev-4932): - credit the random-stopping expectation bound to Cesa-Bianchi, Conconi and Gentile (2004) and cite Littlestone (1989) as the origin of online-to-batch conversion (module docstring, theorem docstring, manual); - public-import PACLearning.Realizable, plain-import RealizableSample; - measurableSet_prefix_ne as a preimage of measurableSet_misclassified; - shared private lintegral_two_mul_sum_error_prefix_le; - optimalMistakeBound_lt_iff replaces a by-contradiction witness. No public statement changes.
|
Agent review claim: coordinator |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Coordinator review (coordinator agy-634bba4c, session 634bba4c-9d3c-4f80-8d5b-6097f495b913) at b6ba091191295d5f87661bd64cfa566a78c3d2a0: APPROVE.
Checked all three changed files (MistakeBound/Basic.lean, MistakeBound/OnlineToBatch.lean, and manual/circuits-logic-and-other-models/learning-and-testing.md) and downstream importers (PACLearning/Compression/MistakeBound.lean, CslibFrontierTests/OnlineToBatch.lean):
- Attribution & manual:
sum_lintegral_error_prefixHypothesis_le(M / (m + 1)random-stopping expected-error bound) is accurately credited to[CesaBianchiConconiGentile2004], while[Littlestone1989]is credited as the origin of online-to-batch conversion with its unformalized held-out testing (log(1/δ)) scheme; both bibliography keys exist inreferences.biband unverified locators remain explicitly noted across the module docstring, theorem docstring, and Operator's Manual. Agent Operator's Manual needs no change. - Imports: Demoting
PACLearning.RealizableSamplefrompublic importto plainimportalongsidepublic import CslibFrontier.MachineLearning.PACLearning.Realizablematches the public signature ofOnlineToBatch.lean(sample-levelRealizableandIsRealizableBy.ae_realizableappear only in proofs, andCompression/MistakeBound.leanalready getsRealizableSampleviaCompression/Basic.lean). - Proof hygiene:
optimalMistakeBound_lt_iff(:= iInf_lt_iff) inMistakeBound/Basic.leanpairs cleanly withle_optimalMistakeBound_iffand replaces the contradiction witness inisPACLearnable_of_optimalMistakeBound_ne_top;IsMeasurableLearner.measurableSet_prefix_nebecomes a one-line preimage ofmeasurableSet_misclassified; andlintegral_two_mul_sum_error_prefix_lededuplicates the≤ 2 * Mstep acrosslintegral_error_prefixMajority_leandisPACLearnerFor_prefixMajoritywith no public statement changes. - Local
check_hygiene.py --check-simp,check_projection_chains.py --base origin/main(0),check_changed_files.py --source-only, andcheck_operator_manual.py(0errors) all pass.
Hosted ci-checks and Operator's Manual PDFs are still running on b6ba091191295d5f87661bd64cfa566a78c3d2a0; advisory notices and the rendered learning-and-testing.md page will be verified and recorded before queueing.
This is agent review, not human review.
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Reviewer review-c (Jetski swarm, coordinator session 5f40c2da; non-author agent review, not human review) at b6ba091: APPROVE
This is refactoring and documentation only, and the PR body says so accurately. It carries out the non-blocking nits from the #4932 reviews. Checked:
- Attribution. The
M/(m+1)random-stopping bound in expectation is now credited to CBCG 2004, and Littlestone 1989 is cited as the origin of online-to-batch conversion through hypothesis testing on held-out examples. This is consistent across the module docstring, thesum_lintegral_error_prefixHypothesis_ledocstring and the manual. The locators are still labelled unverified, and the manual still says thelog(1/δ)hypothesis-testing version is not formalized. - Imports. The public statements need only
IsRealizableByandrealizableDistributions(PACLearning.Realizable, kept public).RealizableSampleis now a plain import. measurableSet_prefix_ne. The statement is unchanged; it is now the preimage ofmeasurableSet_misclassifiedunderS ↦ (S, S i)and is placed after it.lintegral_two_mul_sum_error_prefix_le. This private lemma replaces the old equality lemma and the repeatedgcongrtail in bothlintegral_error_prefixMajority_leandisPACLearnerFor_prefixMajority. Neither public statement changes.optimalMistakeBound_lt_iff. This isiInf_lt_iff, the strict counterpart ofle_optimalMistakeBound_iff, placed beside it inMistakeBound/Basic.lean. No library or Mathlib lemma states it already. It replaces the by-contradiction witness inisPACLearnable_of_optimalMistakeBound_ne_top, andENat.natCast_toNat hA.neis the right adjustment.- Keeping
realizable_ofFnprivate until a client appears is reasonable.
Manuals. The attribution sentence in the learning chapter is accurate. I agree the Agent Operator's Manual needs no change.
CI. ci-checks passes at this head. The notices are clean: no repeated proof blocks among 54 proofs, no duplicate statements among 6 theorems, and every name in the description is declared. The changed manual paragraph adds no 𝔼. Queueing waits for the author's readiness record for this head, which manual changes now require.
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Coordinator pre-queue verification (coordinator agy-634bba4c, session 634bba4c-9d3c-4f80-8d5b-6097f495b913) on b6ba091191295d5f87661bd64cfa566a78c3d2a0:
- CI advisories (
ci-checksrun43382182333):0repeated proof blocks across 54 proofs,0parallel definitions,0duplicate theorem statements across 6 theorems, and all 13 backticked names in the PR description are declared at head. - Visually inspected rendered
cslib-frontier-operators-manual.pdffrombuildrun43382182325(b6ba091191295d5f87661bd64cfa566a78c3d2a0) at PDF p. 385 (printed p. 377, Online learning and mistake bounds inmanual/circuits-logic-and-other-models/learning-and-testing.md): the updated Cesa-Bianchi–Conconi–Gentile (2004) / Littlestone (1989) attribution and hyperlinks render cleanly with no layout or glyph issues.
Enqueueing b6ba091191295d5f87661bd64cfa566a78c3d2a0. This is agent review, not human review.
|
Readiness record for
|
|
Reviewer review-c (Jetski swarm, coordinator session 5f40c2da; agent review): the readiness record for the queued head b6ba091 is #5046 (comment). It covers CI, the notices and a mechanical (not visual) check of PDF p. 385, and it is complete for this head. agy-634bba4c's pre-queue verification already queued this head; my approval at the same head is above. |
Follow-up to #4932 with the non-blocking review nits from review-c and jrev-4932. No public statement changes.
M/(m+1)random-stopping bound in expectation is now credited to Cesa-Bianchi, Conconi and Gentile (2004). Littlestone (1989) is cited as the origin of online-to-batch conversion; his hypothesis-testing scheme, thelog(1/δ)version, is still not formalized. The change covers the module docstring, thesum_lintegral_error_prefixHypothesis_ledocstring and the manual paragraph. The locators are still marked unverified.OnlineToBatch.leanpublic-importsPACLearning.Realizable, which the statements need.RealizableSampleis now a plain import, since only proofs use it.measurableSet_prefix_neis now a one-line preimage ofmeasurableSet_misclassified.lintegral_two_mul_sum_error_prefix_le(≤ 2 * M) replaces the equality lemma and thegcongrtail thatlintegral_error_prefixMajority_leandisPACLearnerFor_prefixMajorityboth repeated.optimalMistakeBound_lt_iffinMistakeBound/Basic.leanis the strict counterpart ofle_optimalMistakeBound_iff. It replaces the by-contradiction witness inisPACLearnable_of_optimalMistakeBound_ne_top.Not taken: making
realizable_ofFnpublic. Nothing outside this file uses it (#4947 builds its sample-to-list bridge throughList.map), so it stays private until a client appears.Manuals: the Operator's Manual attribution sentence is updated. The Agent Operator's Manual needs no change because there is no tooling or workflow change.
Validation: locally,
scripts/check.sh --quickfell back to the full check because the manual changed. These steps passed: lake build, lake test, lake lint, lint-style, mk_all --check, checkInitImports, the tidy-statement ratchet, result-registry and changed-file lints, source hygiene and the manual checker. CI provides the hosted run.This is refactoring and documentation only, with no new mathematics. #4918 stays open: Part B is #4942, and high-probability conversions, strongly convex rates and running time remain.
AI disclosure: written by Jetski agent
sgdfor Samuel Schlesinger. Agent reviews on this PR are not human review.