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

Changed ISTA and FISTA so that g can be None #1580

Merged
merged 19 commits into from
Dec 21, 2023

Conversation

MargaretDuff
Copy link
Member

@MargaretDuff MargaretDuff commented Nov 21, 2023

Describe your changes

Changed ISTA and FISTA so that g can be:
" g : Function or None
Convex function with simple proximal operator. If None is passed, the algorithm will use the ZeroFunction."

Describe any testing you have performed

Please add any demo scripts to CIL-Demos/misc/

Link relevant issues

Closes #1567

Checklist when you are ready to request a review

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'Waiting for review'

Contribution Notes

Please read and adhere to the developer guide and local patterns and conventions.

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License.
  • I confirm that the contribution does not violate any intellectual property rights of third parties

@MargaretDuff MargaretDuff changed the title First attempt Changed ISTA and FISTA so that g can be None Nov 21, 2023
@MargaretDuff MargaretDuff self-assigned this Nov 22, 2023
Copy link
Contributor

@jakobsj jakobsj left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe for a separate issue, but would it make sense to allow the function f to be none (maybe not both at the same time)?

@epapoutsellis
Copy link
Contributor

Maybe in the docs we can write that ISTA is GD when g=None and FISTA is Accelerated Gradient Descent by Nesterov ( INTRODUCTORY LECTURES ON CONVEX OPTIMIZATION algorithm 2.2.9), when g=None.

@MargaretDuff
Copy link
Member Author

Thanks @epapoutsellis - will add that!

@MargaretDuff
Copy link
Member Author

@jakobsj - what's the thought around f being None? What would it default to?

@jakobsj
Copy link
Contributor

jakobsj commented Nov 24, 2023 via email

@epapoutsellis
Copy link
Contributor

If f=None and g!=None then this is called Proximal Point Algorithm which I am not sure acceleration can be applied in Nesterov way.

@MargaretDuff
Copy link
Member Author

@jakobsj @epapoutsellis - I added options for f to be None too. Wasn't sure what to do with the step-size here, so set it to be 1 if f=None and step_size=None is passed

@epapoutsellis
Copy link
Contributor

@MargaretDuff just to let you know that this is related to #1586
These changes could live in PGA and inherited by ISTA/FISTA.

Copy link
Contributor

@jakobsj jakobsj left a comment

Choose a reason for hiding this comment

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

LGTM! Nice extension to either f or g being None. Also nice tests, making direct use of the proximal. I didn't check, but what happens if both f and g are set to None? Should this throw an error or might it make sense to return a zero vector in the shape/geometry of the initial guess?

@MargaretDuff
Copy link
Member Author

Thanks, @jakobsj. I have added a warning if f and g are None. It should return the initial value.

paskino
paskino previously requested changes Dec 8, 2023
Copy link
Contributor

@paskino paskino left a comment

Choose a reason for hiding this comment

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

I propose to raise an error in case both f and g are None, and a couple of formatting changes.

MargaretDuff and others added 2 commits December 11, 2023 13:28
Co-authored-by: Edoardo Pasca <edo.paskino@gmail.com>
Signed-off-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
@MargaretDuff
Copy link
Member Author

Jenkins is happy
image

Signed-off-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
Copy link
Member

@gfardell gfardell left a comment

Choose a reason for hiding this comment

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

Changes requested in individual comments. It looks like a good change to FISTA/ISTA though.

Signed-off-by: Margaret Duff <43645617+MargaretDuff@users.noreply.github.com>
@MargaretDuff MargaretDuff dismissed paskino’s stale review December 21, 2023 15:39

Changes have been implemented - Thanks for reviewing!

@MargaretDuff MargaretDuff merged commit 544cad1 into TomographicImaging:master Dec 21, 2023
2 checks passed
@MargaretDuff MargaretDuff deleted the fista-second-term branch December 21, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

FISTA second term, g, to be allowed to be None
5 participants