Skip to content

Guard patient partitions and IRLS convergence; add reproducible comparator benchmark - #6

Draft
aRealGem wants to merge 12 commits into
mainfrom
integrate/reviewed-predval-20261010
Draft

aRealGem wants to merge 12 commits into
mainfrom
integrate/reviewed-predval-20261010

Conversation

@aRealGem

@aRealGem aRealGem commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

This draft combines the reviewed patient-partition guard, IRLS convergence guard, and reproducible alternatives benchmark.

  • Validate non-missing patient IDs and integer cross-validation partitions in all six released IMPROVE random-forest tables. Reject a patient appearing in multiple partitions before either fixture is written. The documentation distinguishes metadata validation from an audit of upstream training or NNAlign split assignments.
  • Return unavailable (None) when IRLS exhausts its iteration budget without satisfying the existing convergence test. Keep the estimator, tolerance, and iteration limit unchanged. Add quasi-separation, finite-MLE budget-exhaustion, recalibration, and report regressions.
  • Add a bounded comparator benchmark using a held-out WDBC fixture and a synthetic repeated-patient fixture, with matched estimands and an independent sklearn/statsmodels control. Execute Python/PyCalEva and R probably/rsample comparisons, and clearly label the isitfair adapter as source-reviewed but unexecuted.
  • Preserve historical benchmark evidence and add separately labeled integrated verification. Generated row-level fixtures/predictions are excluded.

Verification on the reviewed, identical file tree

  • Combined Python suite: 282 passed, 20 optional fixture-dependent skips, no failures or expected failures.
  • Comparator contracts: 6 passed, including the formerly expected-failure quasi-separation case.
  • Ruff lint, Ruff formatting, and git diff --check: passed.
  • Two integrated Python comparator reruns matched all 13 stable input/result hashes.
  • Seven retained R evidence hashes verified. R computation was not rerun during integration; the adapter and exported inputs were unchanged.
  • GitHub CI completed successfully on published head 4829570: lint and formatting passed; 276 tests passed, 20 skipped. The configured CI suite runs tests; the six comparator contracts were additionally covered by the combined local suite above.

See integration verification and the benchmark report.

Evidence limits

  • The 20 skipped checks require optional PCam, GUSTO, or IMPROVE fixture/golden inputs; full golden-output revalidation is not claimed.
  • Both comparator gain intervals cross zero. They condition on fixed held-out predictions and omit correction-training uncertainty; they do not establish repeated-sampling coverage.
  • The convergence guard can make a valid finite-MLE fit unavailable when more iterations are needed. It is not a universal separation detector.
  • Competitor corrections with different estimands/configurations are reported separately. No clinical validation, universal superiority, measured developer-time savings, or between-tool speed claim is made.
  • The separate statistical-stress study at local commit df23b1c, including validation/statistical_stress/** and tests/test_statistical_stress.py, is excluded.
  • This PR remains a draft and unmerged. Existing PR IMPROVE third-party predictor panel, plus a fix for the coverage-delta column it broke #2 is unchanged.

Publication provenance

GitHub connector publication assigns new commit metadata, so published commit IDs differ from the reviewed local IDs. Every one of the six published file-tree hashes was verified identical to its reviewed local counterpart, preserving the original commit sequence and file contents. The source hashes and local-only statements retained in the benchmark records describe the historical verification stage before this publication.

Reviewed local head: 150998f76df1141c73b6c3621233e693c4eb0b49
Published head: 4829570fd3809c1fda779e8ea24fc9017fcb43a4
Identical complete tree: cacfe06f6bad5942962ce2b1699d4a95aa0dce1f

Local → published commit mapping:

  • 99ca3d72f1d4f8340df9a59de3616277e9ebdb7a → b5fe8a39466c469576b5955ae4b6851cf607a5f5
  • dae6e1ad1c9c20bcd179e5db7cf9f71e3d888beb → af4c88c913dd45889332a24947061ba51f64fd56
  • 756e5a1956578a340eddb90806813ddee62e30fc → eb22fde21e5d18e6f57f9f354f717ad2a31ee0e5
  • 868276ef960f0bc7f2bc75cc79926ff7b3c2e1f1 → 9533c0b75ddea5c6a39abc59746d6ae020a7139f
  • 617ddac480849ac48de41c1c1b1d050ddc427492 → 7792ba8402556a972d4aa1533233769636e39a35
  • 150998f76df1141c73b6c3621233e693c4eb0b49 → 4829570fd3809c1fda779e8ea24fc9017fcb43a4

Author and committer were verified as aRealGem <203440826+aRealGem@users.noreply.github.com> on each published commit.

Co-developed-with: OpenAI Codex

Validate grouping metadata across all six random-forest tables before
writing fixtures. Add synthetic regression coverage and clarify that
metadata checks do not independently audit upstream training or NNAlign.

Validation: 269 passed, 20 fixture-dependent skips; 18 focused tests pass.
Ruff lint and formatting pass. No numerical estimator or fixture changes.


Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: 99ca3d72f1d4f8340df9a59de3616277e9ebdb7a
Co-developed-with: OpenAI Codex
Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: dae6e1ad1c9c20bcd179e5db7cf9f71e3d888beb
Co-developed-with: OpenAI Codex
Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: 756e5a1956578a340eddb90806813ddee62e30fc
Co-developed-with: OpenAI Codex
Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: 868276ef960f0bc7f2bc75cc79926ff7b3c2e1f1
Co-developed-with: OpenAI Codex
Return None when the existing IRLS convergence test has not succeeded by the iteration limit. Preserve the existing estimator, tolerance, and converged fit results. Exercise quasi-separation, finite-MLE budget exhaustion, and downstream recalibration unavailability in the ladder and HTML report.

Validation: 276 passed, 20 fixture-dependent skips; 71 focused tests pass. Five new regression cases fail against the original implementation. Ruff lint and formatting pass. Independently reviewed; no golden files changed.


Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: 617ddac480849ac48de41c1c1b1d050ddc427492
Co-developed-with: OpenAI Codex
Remove the strict expected failure for quasi-separation now that the reviewed convergence guard is present. Keep the historical benchmark protocol, results, and verification unchanged; label current integration evidence separately.

Validation: 282 passed, 20 optional fixture-dependent skips; 6 benchmark contracts pass separately with no xfail. Two comparator reruns match all 13 original stable file hashes. Seven retained R evidence hashes verify; R computation was not rerun because adapter and inputs are unchanged. Ruff lint, formatting, and diff checks pass.


Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: 150998f76df1141c73b6c3621233e693c4eb0b49
Co-developed-with: OpenAI Codex
Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: 4a289159a937c49b1d06469e93db9079fef5f47f
Co-developed-with: OpenAI Codex
Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: 470338a5a994211e41103491e4028e4b9b2ce198
Co-developed-with: OpenAI Codex
Apply the reviewed documentation corrections without changing the production Python AST. Clarify cluster-design assumptions, fixed-prediction interval limitations, whole-rung unavailability, and apparent versus pooled cross-fit rank preservation. Preserve historical benchmark evidence.


Publication preserves the reviewed file tree; connector-assigned commit metadata differs.

Reviewed-local-commit: bdd1f36b270be2f6a587ff2f7762e0ec0eef0f3b
Co-developed-with: OpenAI Codex
Document the public API with a small synthetic CSV cohort, explicit event-probability orientation, and practical clustering, roster, coverage, and interpretation guidance. Qualify fixed-prediction gain intervals and distinguish apparent rank preservation from pooled cross-fit reordering at the report's decision points.

Add regression checks for the report language and execute the README example in a clean directory, checking its observation and cluster counts and independently calculated baseline metrics. Production Python files, estimators, defaults, and historical benchmark evidence are unchanged.

Reviewed-patch-sha256: f260276a029cb5bafe1c4d116df0bde489d2751fcc11a9eb2d3326734b41111b
Co-developed-with: OpenAI Codex
Preserve the original frozen surviving numerical values while removing the 42 full/common rows for one unavailable Basket model/rung3 cell and replacing its flag. Render the current qualified report wording, explain the half-pair rule without referencing a missing document, and qualify the opening discrimination claim. Add focused reporting regressions.

The complete paired B=2000 controls ran under Python 3.12.14. Canonical Python 3.13.16 validation restores unchanged dependency pins, confirms the affected fit, reproduces the original-template HTML byte-for-byte, verifies deterministic revised rendering and exact preservation, and passes 280 ordinary tests with 20 skips. This surgical refresh is not a fresh full canonical B=2000 golden regeneration. PCam/GUSTO golden checks remain pending. No estimator, production iteration budget or tolerance is changed; separate statistical-stress studies remain excluded.

Reviewed-patch-sha256: b0e47fd8bc196c88db3168f4d17b756d27ccaa86918d6fffcd33c445067e79c8
Reviewed-tree: c1f838a
Co-developed-with: OpenAI Codex
Allow absolute 1e-10 roundoff only in named continuous outputs while preserving exact structure, metadata, flags, classifications and nonfinite masks. Guard interval decision boundaries and ordering; add 67 unskipped mutation checks.

The original byte gate failed after a full canonical run. Its saved outputs pass this revised comparator without another numerical run. Production calculations and frozen expected outputs are unchanged; PCam and GUSTO gates remain unchanged.

Validation: 347 passed, 20 skipped; Ruff lint and formatting passed.

Co-developed-with: OpenAI Codex
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