Skip to content

beat(P1): GaussianNB accuracy-parity gate vs scikit-learn#2267

Merged
noahgift merged 1 commit into
mainfrom
beat/gaussiannb-accuracy-parity-20260703
Jul 3, 2026
Merged

beat(P1): GaussianNB accuracy-parity gate vs scikit-learn#2267
noahgift merged 1 commit into
mainfrom
beat/gaussiannb-accuracy-parity-20260703

Conversation

@noahgift

@noahgift noahgift commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

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.

value
scikit-learn 1.9.0 1.0000
apr GaussianNB 1.0000 (exact parity)
contract threshold 0.94 (sklearn − 6pp; 3-class random ~0.33 → non-vacuous)

Deterministic (closed-form, no random_state) + host-independent, so it lives in the per-PR blocking chain — the second P1 accuracy gate (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 the iris beat (apples-to-apples). Runs in the per-PR nextest step; contract pv validate + pv lint clean.

🤖 Generated with Claude Code

…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>
@noahgift noahgift enabled auto-merge July 3, 2026 15:09
@noahgift noahgift added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit bf3524c Jul 3, 2026
11 checks passed
@noahgift noahgift deleted the beat/gaussiannb-accuracy-parity-20260703 branch July 3, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant