Skip to content

Share binomial weights across correction probability paths - #4

Merged
soodoku merged 1 commit into
mainfrom
perf/correction-probability-grid
Nov 21, 2026
Merged

soodoku merged 1 commit into
mainfrom
perf/correction-probability-grid

Conversation

@soodoku

@soodoku soodoku commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

The Bernoulli mean, its standard deviation, and the marginal correction path use the same binomial probability weights. Build them for the entire probability grid with NumPy broadcasting. The marginal path now validates its own grid without computing and discarding the full Bernoulli mean and variance.

The benchmark uses an additive game with an explicit pairwise interaction, so each marginal is known at every probability. Regression tests cover the one-player boundary, endpoint probabilities, empty probability grids, and validation. The existing permutation and Bernoulli subset oracles still run.

Public timings in milliseconds, median of seven alternating-order pairs on arm64 macOS. Both revisions use the project’s locked dependencies and one BLAS thread. Each receives the same inputs.

Operation Size Before After Speedup
marginal_path, 251 probabilities 8 1.3223 0.2006 6.59×
marginal_path, 251 probabilities 14 5.8336 3.2074 1.82×

Maximum absolute before/after difference across the timed outputs: 0.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T21:53:10.879973Z ae808fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@soodoku
soodoku merged commit c374a0d into main Nov 21, 2026
2 checks passed
@soodoku
soodoku deleted the perf/correction-probability-grid branch November 21, 2026 21:54
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