ModOpt icon indicating copy to clipboard operation
ModOpt copied to clipboard

[BUG] Possible error in Ridge proximal operator

Open Biagig opened this issue 3 years ago • 0 comments

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
  • [X] No

Biagig avatar Jul 20 '21 10:07 Biagig