Skip to content

[ParmEst] Fix likelihood ratios and leave-N-out bootstrap - #4129

Draft
adowling2 wants to merge 1 commit into
Pyomo:mainfrom
adowling2:codex/parmest-lr-leave-n-out
Draft

adowling2 wants to merge 1 commit into
Pyomo:mainfrom
adowling2:codex/parmest-lr-leave-n-out

Conversation

@adowling2

Copy link
Copy Markdown
Member

Fixes #4101, #4100.

Summary/Motivation:

ParmEst hard-coded two degrees of freedom in its likelihood-ratio cutoff. The current leave-N-out bootstrap comparison fitted the full data for both sides of each split and restarted the seed for each fold.

Changes proposed in this PR:

  • Use the fitted scalar parameter count and objective-specific likelihood-ratio scaling for the built-in Gaussian objectives. Keep the historical approximation for custom and deprecated objectives with the corrected parameter count.
  • Fit each held-out set, bootstrap its complement, and advance one random stream across folds. Keep the existing bootstrap acceptance rule and avoid overwriting the full-data fit.
  • Document the assumptions and add regressions for the cutoffs, split membership, and seed behavior.

Verification

  • All 10 focused tests passed on the rebased commit e894ba2 (based on Pyomo main at 16958cd). The six new regressions failed on the upstream baseline and passed with the patch.
  • A two-process Open MPI check verified agreement on fits and propagation of a solver failure.
  • Focused tests covered 82 of 96 changed executable production lines (85%). Black, the repository-configured spelling check, and the Git whitespace check passed.
  • Fork CI run #210 is still running. No ParmEst failures appeared in the completed logs. Four jobs each passed 152 ParmEst tests, including all six new regressions. Those four jobs failed on the same six HiGHS warm-start tests outside ParmEst.
  • The Linux MPI job stopped before tests because Ipopt could not load liblapack.so.3. The URL checker flagged two existing links in the README and preprocessing guide. All three citations added in this PR passed.

AI-Use Disclosure

  • AI tools were NOT used during the preparation of this PR

or

  • AI tools contributed to the development of this PR

    • AI tools generated documentation (including the PR description/comments, code comments, and/or Sphinx documentation)
    • AI tools generated tests (baselines, examples, and/or code)
    • AI tools generated code (apart from tests)

    Review process (select ONE):

    • Rewritten: All AI-generated content was rewritten by me before being committed.
    • Reviewed/verified: I retained AI-generated content and verified it before committing. Verification included (as applicable):
      • Ran the code and fixed issues
      • Added and ran tests
      • Checked correctness/logic of code and tests
      • Checked for alignment with the contribution guide
      • Considered security implications
    • As-is: AI-generated content was commited directly to the repository

Notes for reviewers (optional):

  • I @adowling2 need to carefully review this code first, then update the AI disclosure statement above

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@adowling2
adowling2 marked this pull request as draft December 4, 2026 15:24
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.

likelihood_ratio_test hard-codes 2 estimated parameters leaveNout_bootstrap_test never uses the leave-N-out sample

1 participant