beat(P1): GaussianNB accuracy-parity gate vs scikit-learn#2267
Merged
Conversation
…cking) Adds the accuracy half of GaussianNB's replace+beat story. The speed half (beat_sklearn_gaussiannb_speed, ~4.9x faster after the ln(2πσ²) hoist) already runs nightly; this gate proves apr's GaussianNB is at least as ACCURATE as scikit-learn on the same data/split — together, provably accuracy-equal AND faster on the canonical Iris task. Deterministic (GaussianNB is closed-form, no random_state) and host-independent, so unlike the host-variance speed beats it lives in the per-PR BLOCKING chain — the SECOND per-PR accuracy gate for P1 (alongside beat_sklearn_iris / RandomForest), broadening the merge-gate's provable-correctness surface from one classifier to two. Same deterministic i%3 Iris split as beat_sklearn_iris (apples-to-apples). sklearn 1.9.0 scores 1.0000; apr scores 1.0000 (exact parity); contract threshold 0.94 (sklearn minus a 6pp margin; 3-class random baseline ~0.33, so the gate is non-vacuous). Runs in the per-PR nextest step; contract apr-sklearn-gaussiannb-accuracy-beat-v1.yaml (pv validate + lint clean). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Adds the accuracy half of GaussianNB's replace+beat story. The speed half (
beat_sklearn_gaussiannb_speed, ~4.9× faster after the ln(2πσ²) hoist) already runs nightly — this per-PR gate proves apr's GaussianNB is at least as accurate as scikit-learn on the same split. Together: provably accuracy-equal AND faster on the canonical Iris task.Deterministic (closed-form, no
random_state) + host-independent, so it lives in the per-PR blocking chain — the second P1 accuracy gate (alongsidebeat_sklearn_iris/RandomForest), broadening the merge-gate's provable-correctness surface from one classifier to two. Same deterministici%3Iris split as the iris beat (apples-to-apples). Runs in the per-PRnexteststep; contractpv validate+pv lintclean.🤖 Generated with Claude Code