Skip to content

[BUG] Possible error in Ridge proximal operator #155

Description

@Biagig

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions