Skip to content

Adding regularization objective option to parmest#3550

Merged
blnicho merged 72 commits into
Pyomo:mainfrom
sscini:parmest_obj_regularization
May 19, 2026
Merged

Adding regularization objective option to parmest#3550
blnicho merged 72 commits into
Pyomo:mainfrom
sscini:parmest_obj_regularization

Conversation

@sscini
Copy link
Copy Markdown
Contributor

@sscini sscini commented Apr 2, 2025

Fixes # .

Summary/Motivation:

Currently, the only default objective is the standard SSE objective. This edit provides the capability to add a
regularization term to the SSE objective with a prior FIM and reference parameter values.

Changes proposed in this PR:

  • Added prior_FIM and theta_ref as keyword arguments for Estimator
  • Added options within Estimator to apply the regularization term to SSE if the new arguments were defined

TODO before converting from draft

  • Receive feedback from collaborators on logical setup
  • Finish edits and debug
  • Confirm functionality with examples

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.

@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented Apr 2, 2025

@djlaky @adowling2 Please provide early feedback

@sscini sscini changed the title Adding regularization feature as an option to the default SSE objective Adding regularization feature in parmest as an option to the default SSE objective Apr 2, 2025
Copy link
Copy Markdown
Member

@adowling2 adowling2 left a comment

Choose a reason for hiding this comment

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

@sscini See my early feedback.

Comment thread pyomo/contrib/parmest/parmest.py Outdated
Comment thread pyomo/contrib/parmest/parmest.py Outdated
@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented Jul 15, 2025

UPDATE (07/15/25); Intended to be added AFTER Shammah's weighted SSE PR (#3535) and follow a similar format, adding another option for available objectives using Enums.

Currently preparing for next stage of review

@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented Jul 15, 2025

@adowling2 @djlaky Made some edits to this finally. Meant to follow Shammah's layout in PR #3535, waiting to merge, currently some conflicts I cannot resolve on my end.

Made it's own full objective instead of a term to add. Also added weighting term.

Ready for next round of review.

@sscini sscini changed the title Adding regularization feature in parmest as an option to the default SSE objective [Depends on #3535] Adding regularization objective option to parmest Aug 18, 2025
@blnicho blnicho changed the title [Depends on #3535] Adding regularization objective option to parmest Adding regularization objective option to parmest Sep 30, 2025
@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented Dec 12, 2025

Will not be actively worked on before finalization of _Q_opt_blocks. Closing for now to resume in the future.

@sscini sscini closed this Dec 12, 2025
@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented May 18, 2026

@blnicho Thanks for clarifying! I started working on tests but still need to finalize. Away from computer but should be online have them in by early afternoon in MT.

@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented May 18, 2026

@slilonfe5 @adowling2 @blnicho One small design question I wanted to clarify. In this implementation it was assuming the theta and cov were returned as pd.Series and pd.DataFrames, respectively. We changed in _Q_opt to where theta is now a dictionary.

Should this support: a) current pd Series and DataFrames, b) Dictionary and DataFrames, c) Both dictionaries, or d) both dictionaries and pd objects for either?

The other option is to convert the output back to pd.Series for theta, but converting dict to a series can be shown in an example if that is the stronger long term design choice.

All of this can also be decided in a future PR if this is not a large issue.

@slilonfe5
Copy link
Copy Markdown
Member

@slilonfe5 @adowling2 @blnicho One small design question I wanted to clarify. In this implementation it was assuming the theta and cov were returned as pd.Series and pd.DataFrames, respectively. We changed in _Q_opt to where theta is now a dictionary.

Should this support: a) current pd Series and DataFrames, b) Dictionary and DataFrames, c) Both dictionaries, or d) both dictionaries and pd objects for either?

The other option is to convert the output back to pd.Series for theta, but converting dict to a series can be shown in an example if that is the stronger long term design choice.

All of this can also be decided in a future PR if this is not a large issue.

@sscini, I think the design decision (dictionary for theta and pd.DataFrame for cov) from the merged Q_opt PR is better. These should already reflect on this branch after updating it with the Pyomo main.

@blnicho
Copy link
Copy Markdown
Member

blnicho commented May 18, 2026

I agree with @slilonfe5, let's stick with the design from the Q_opt PR for now.

@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented May 18, 2026

@blnicho With the reviewer approval, when I make new changes will the coverage test rerun each time, or once I am finished do I request the new coverage test?

@blnicho
Copy link
Copy Markdown
Member

blnicho commented May 18, 2026

The coverage will be updated every time you make changes to this PR

@sscini
Copy link
Copy Markdown
Contributor Author

sscini commented May 19, 2026

@blnicho @mrmundt Please review final version when available. There was one more small change required if you could please add the pre-test inspected label once more. Otherwise all tests passing. Thanks!

@slilonfe5
Copy link
Copy Markdown
Member

@blnicho @mrmundt Please review final version when available. There was one more small change required if you could please add the pre-test inspected label once more. Otherwise all tests passing. Thanks!

@blnicho @mrmundt Most of the code is now covered. I think this is ready to be merged

Comment thread pyomo/contrib/parmest/parmest.py Outdated
@sscini sscini requested a review from mrmundt May 19, 2026 15:47
@blnicho blnicho merged commit 92951cb into Pyomo:main May 19, 2026
33 of 34 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for design review to Done in ParmEst & Pyomo.DoE Development May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

6 participants