Skip to content

Conversation

@smondal13
Copy link
Contributor

@smondal13 smondal13 commented Dec 16, 2025

Fixes

Summary/Motivation:

In the old definition of A-optimality (we will call it pseudo A-optimality from now on), DoE computed the trace of the Fisher Information Matrix (FIM), as few studies used that definition. However, that is not correct, and new literature mentions the trace of the inverse of the FIM as A-optimality. This PR has adopted this new definition of A-optimality in DoE.

Changes proposed in this PR:

  • Change the old A-optimality to pseudo A-optimality
  • Implement a new definition of A-optimality (=trace(inverse of FIM))

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.

@smondal13
Copy link
Contributor Author

@adowling2 @blnicho This PR is ready for initial review.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you replaced every instance of trace with pseudo_trace in these tests. trace is still a valid objective type so I'm curious why you wouldn't want a mix of tests with both options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not done any testing for the new trace(trace of the covariance matrix). The previous Pyomo.DoE versions that used trace actually meant trace of Fisher Information Matrix (FIM). Now, following Dan's Greybox paper, we are referring to the trace of Fisher Information Matrix (FIM) as pseudo_trace. That's why I have replaced all instances of trace with pseudo_trace. We need new tests for the new trace (trace of the covariance matrix). I plan to do that after the review. Does this answer your question? It may be confusing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification. I think we should include those tests in this PR before it gets merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add tests for the new trace (trace of the covariance matrix). This PR is for initial review to determine whether I need to make any major changes before I proceed with the testing. Thanks for reviewing.

smondal13 and others added 2 commits December 18, 2025 15:12
Replace `model` with `m` in `cholesky_LLinv_imp()`

Co-authored-by: Bethany Nicholson <[email protected]>
Copy link
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smondal13 thanks for addressing my initial review comments. I think these changes look reasonable so far but would like to see tests for the corrected A-optimality before I'll approve the PR.

@blnicho blnicho self-requested a review December 18, 2025 21:24
Copy link
Contributor Author

@smondal13 smondal13 Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blnicho @adowling2 I have created a DoE example for the rooney_biegler experiment, mainly for testing DoE. Where should this live? I can move it to parameter_estimation_example.py and rename the file to rooney_biegler_example.py or something similar. Or are you okay with the current standalone script?

@smondal13
Copy link
Contributor Author

smondal13 commented Dec 19, 2025

@blnicho @adowling2 I have added tests for A-optimality and added tests for the plotting functionality in doe.py as well. This is now ready for final review.

@smondal13
Copy link
Contributor Author

@adowling2, this PR is ready for final review.

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

❌ Patch coverage is 66.21622% with 75 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.46%. Comparing base (168e961) to head (a362b30).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
pyomo/contrib/doe/doe.py 68.54% 39 Missing ⚠️
...rib/parmest/examples/rooney_biegler/doe_example.py 44.82% 32 Missing ⚠️
...les/rooney_biegler/parameter_estimation_example.py 60.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3803      +/-   ##
==========================================
+ Coverage   89.41%   89.46%   +0.04%     
==========================================
  Files         909      907       -2     
  Lines      105579   105621      +42     
==========================================
+ Hits        94408    94493      +85     
+ Misses      11171    11128      -43     
Flag Coverage Δ
builders 29.11% <17.56%> (-0.01%) ⬇️
default 86.08% <66.21%> (?)
expensive 35.72% <18.01%> (?)
linux 86.77% <66.21%> (-2.42%) ⬇️
linux_other 86.77% <66.21%> (+0.03%) ⬆️
osx 82.95% <66.21%> (+0.07%) ⬆️
win 85.04% <66.21%> (+0.05%) ⬆️
win_other 85.04% <66.21%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@smondal13 smondal13 moved this from Ready for design review to Ready for final review in ParmEst & Pyomo.DoE Development Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for final review

Development

Successfully merging this pull request may close these issues.

4 participants