-
Notifications
You must be signed in to change notification settings - Fork 550
Extended Parmest Capability for weighted SSE objective #3535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@slilonfe5 Here is some quick feedback
Feedback on the
|
@adowling2 @djlaky I also updated the calculation for the normal SSE such that we can use the user-supplied measurement error if defined; otherwise, we calculate the measurement error as usual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice progress. I think it is time to start writing tests for the new capabilities.
@slilonfe5 Once you have the tests ready, tag us for feedback. Also, I think you can skip adding this to the depreciated class. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is more feedback as you work on getting this ready for the Pyomo team to review.
@adowling2 @djlaky I have created a separate method ( I tested these with three examples (2 steady state and 1 dynamic), and all work well. I'm yet to write the test file for these. |
@blnicho @mrmundt @jsiirola @adowling2 @djlaky I have implemented Miranda's final review on this PR. I think this can be moved to Reviewer Approved in the August 2025 Release dashboard. |
@blnicho Just a kind reminder that I'm waiting for your pending comments (the ones you mentioned during Tuesday's meeting). Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slilonfe5 here are some initial comments/suggestions. I'm still going through a couple of the files but I have some more substantial questions that I'll message you separately about.
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
Co-authored-by: Bethany Nicholson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@slilonfe5 here are a few more review comments. I'm still going through parmest.py
else: | ||
self.assertAlmostEqual( | ||
cov.iloc[asymptote_index, asymptote_index], 36.935351, places=2 | ||
) # 6.22864 from paper | ||
self.assertAlmostEqual( | ||
cov.iloc[asymptote_index, rate_constant_index], | ||
-2.551392, | ||
places=2, | ||
) # -0.4322 from paper | ||
self.assertAlmostEqual( | ||
cov.iloc[rate_constant_index, asymptote_index], | ||
-2.551392, | ||
places=2, | ||
) # -0.4322 from paper | ||
self.assertAlmostEqual( | ||
cov.iloc[rate_constant_index, rate_constant_index], | ||
0.243428, | ||
places=2, | ||
) # 0.04124 from paper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you only end up in this else-statement when cov_method="reduced_hessian". Why don't these covariance values match the expected values from the paper or the values calculated using the other methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using the true sse
to compute the covariance matrix. Previously, we calculated the covariance by assuming that the obj_val
is the sse
, which is not true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the three calculation methods aren't approximating the same sse and covariance?
Fixes # .
Summary/Motivation:
Currently, the Parmest SSE objective does not support measurements in different units. This work adds new capabilities to Parmest, including weighted SSE to handle measurements in different units, and more robust covariance matrix calculation methods for more accurate uncertainty quantification. This work also enables the calculation of the covariance matrix using a user-supplied measurement error standard deviation.
Changes proposed in this PR:
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: