-
Notifications
You must be signed in to change notification settings - Fork 24
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
Update to allow no bounds #213
Conversation
NicolaCourtier
commented
Feb 22, 2024
- Use the spm_adam example to test optimisation without bounds, since Adam does not use them
- Allow bounds=None in place of lower and upper bounds
- Add checks to test_parameters
- Raise an error in plot_cost2d if bounds not available
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #213 +/- ##
===========================================
+ Coverage 94.29% 94.34% +0.04%
===========================================
Files 32 32
Lines 1614 1661 +47
===========================================
+ Hits 1522 1567 +45
- Misses 92 94 +2 ☔ View full report in Codecov by Sentry. |
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.
Looks good, thanks for the addition @NicolaCourtier!
Just to confirm, have you checked the performance of the non-gradient based optimisers without bounds added? Bounds are optional from the Pints side, but it would be good to check that they don't affect our solutions.
It would also be good to remove the bounds from the IRPropMin and GradientDescent examples.
Thanks for the comment @BradyPlanden - I've updated the two other examples as suggested. What kind of performance tests are you thinking of for the non-gradient-based optimisers? If there are parameter values for which there is no solution, the optimiser can fail at the initial point but the likelihood of this is strongly dependent on the choice of prior. |
Thanks - looks great! I would consider updating the |
Hi @BradyPlanden, this might be worth a second review. I've made the following changes in order to implement your suggestion to have one parameter without bounds in the parameterisation tests:
|
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.
Thanks for adding in the additional code for unbounded optimisation @NicolaCourtier! I have a few comments in areas that I think we can improve code comprehension. All in all it's looking very good!
Co-authored-by: Brady Planden <[email protected]>
Co-authored-by: Brady Planden <[email protected]>