Adding regularization objective option to parmest#3550
Adding regularization objective option to parmest#3550sscini wants to merge 50 commits intoPyomo:mainfrom
Conversation
|
@djlaky @adowling2 Please provide early feedback |
pyomo/contrib/parmest/parmest.py
Outdated
|
|
||
| Added to SSE objective function | ||
| """ | ||
| expr = ((theta - theta_ref).transpose() * prior_FIM * (theta - theta_ref) for theta in model.unknown_parameters.items()) |
There was a problem hiding this comment.
Does this run? My intuition is that you need to write out the matrix multiplication and cannot use matrix multiplication.
|
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 |
|
@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. |
|
Will not be actively worked on before finalization of _Q_opt_blocks. Closing for now to resume in the future. |
|
@slilonfe5 @adowling2 @blnicho @mrmundt Please review at your earliest convenience. Questions are included within the added code as comments. Please give preference on implementing the addition to the calculated covariance. Thanks! |
|
After conversation with Alex, made implementation decision. Method is applied in compute_covariance_matrix(), before FIM is inverted, preventing numerical issues from need to invert final covariance, add prior_FIM, and invert again if applied at end of _cov_at_theta. Currently supported for default (finite_difference) and automatic_differentiation_kaug methods. Need to find alternative implementation for support with reduced_hessian method. |
Weight was not symbolic, so was not affecting parameter estimation. Made significant changes to adjust structure so the regularization weight is calculated within the Estimator class, and applied to the covariance update as well.
|
Thursday night (03/05/26): Made changes to architecture based on additional recommendations from ND Pyomo Dev team, and added a separate testing file for tests I am considering adding to review. All feedback is appreciated. Main items of interest in review:
Thanks! |
| "theta_ref is None. Using initialized parameter values as reference." | ||
| ) | ||
|
|
||
| # Construct the Quadratic Form (The L2 term) |
| return samplelist | ||
|
|
||
| # @Reviewers: Currently regularization chosen with objective at Estimator initialization, | ||
| # Would it be preferable to have regularization choice as an argument in the theta_est function instead? |
There was a problem hiding this comment.
Yes, I could see a user wanting to rerun parameter estimation with a few different regularization options.
|
I was mistaken. This PR does NOT depend on #3789. That being said, the Q-opt refactor PR is higher priority. |
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:
TODO before converting from draft
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: