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

[BUG] Possible error in Ridge proximal operator #155

Open
1 of 2 tasks
Biagig opened this issue Jul 20, 2021 · 0 comments
Open
1 of 2 tasks

[BUG] Possible error in Ridge proximal operator #155

Biagig opened this issue Jul 20, 2021 · 0 comments
Assignees
Labels
Projects

Comments

@Biagig
Copy link

Biagig commented Jul 20, 2021

System setup
modopt version: v1.5.1

Describe the bug
Using Ridge in a reconstruction (with Condat in my case) raises a ValueError: dimension mismatch. Other similar proximity operators (SparseThreshold or ElasticNet) don't have this issue.
Ridge applies the _linear operator to the input_data before applying the thresholding operations, but when running a reconstruction, this input_data is already in the image space of this linear operator, so only the thresholding step should be done. This is what happens in SparseThreshold and ElasticNet.

Screenshots
Error when using Condat with Ridge:
Ridge Error

Module and lines involved
Replacing line 729 of modopt.opt.proximity:
return self._linear.op(input_data) / (1 + threshold)
by:
return input_data / (1 + threshold).
worked and gave results that looked like what we would expect.

Changing the name of the parameter to 'linear_coeffs' or something similar would maybe make it less confusing.

Are you planning to submit a Pull Request?

  • Yes
  • No
@Biagig Biagig added the bug label Jul 20, 2021
@sfarrens sfarrens self-assigned this Dec 17, 2021
@sfarrens sfarrens added this to ToDo in ModOpt-dev via automation Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
ModOpt-dev
  
ToDo
Development

No branches or pull requests

2 participants