Skip to content
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

Priors/intermediate prior class #21

Draft
wants to merge 32 commits into
base: RDP/HessianVectorProduct
Choose a base branch
from

Conversation

robbietuk
Copy link
Owner

@robbietuk robbietuk commented Oct 2, 2021

This PR aims to add an intermediate class to the current prior hierarchy that will perform the iterations over each of the priors in STIR.

robbietuk and others added 30 commits June 6, 2021 17:30
* RDP accumulate_Hessian_times_input

* Added RDP Hessian documentation

* Add div by 0 safety

* Add epsilon to Hessian function
* RDP Documententation

* QP use (off_)diagonal_second_derivative methods and documentation

* Restructure RDP and QP Hessian logic

* Improve RDP and QP documentation

* Implement log cosh accumulate_Hessian_times_input in terms of derivatives

* Documentation
* Add method get_is_convex(), which accesses prior is_convex parameter and only test convexity of priors if convex function

* compute_Hessian method added to generalised prior and errors by default but with different messages depending on is_convex 

* Test rename and create test_Hessian_convexity and test_Hessian_methods

* Add test for compute_Hessian

* RelativeDifferencePrior initialisation call set_defaults

* Modernise `compute_Hessian` for QP and LogCosh. Add `compute_Hessian` for RDP

* Correct RDP second derivative functions

* Major changes to test_Hessian_against_numerical, which loops over each voxel for perturbation response

* Add verbosity suppression to suppress gradient info calls
Reenable PLS, but disable all numerical tests - just run setup.
Make is_convex() a pure virtual method in GeneralisedPrior to be implemented in each prior.

FilterRoot is not convex as it does not have 0th or 2nd order behaviour
Co-authored-by: Kris Thielemans <KrisThielemans@users.noreply.github.com>
Co-authored-by: Kris Thielemans <KrisThielemans@users.noreply.github.com>
Co-authored-by: Kris Thielemans <KrisThielemans@users.noreply.github.com>
This removes two checks on Succeeded::no in GeneralisedObjectiveFunction
@robbietuk robbietuk marked this pull request as draft October 2, 2021 01:03
@robbietuk
Copy link
Owner Author

Currently I have added an intermediate class between QuadraticPrior (QP) and GeneralisedPrior called GeneralisedConvexPrior.

GeneralisedConvexPrior inheriates from GeneralisedPrior but so does PriorWithParabolicSurrogate. QP needs to inheriate from both of these classes, meaning I needed to make these virtual inheritance.

@robbietuk
Copy link
Owner Author

@robbietuk robbietuk force-pushed the RDP/HessianVectorProduct branch from 15aebe7 to 6596d29 Compare June 27, 2022 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant