bwohlberg / sporco

Sparse Optimisation Research Code
http://brendt.wohlberg.net/software/SPORCO/
BSD 3-Clause "New" or "Revised" License
258 stars 37 forks source link

Generalised sparse coding problem #9

Closed SamusRam closed 4 years ago

SamusRam commented 4 years ago

Dear Mr. Wohlberg,

thank you for the great library. I wonder if it might be possible to use SPORCO to solve a generalised sparse coding problem. If yes, could you please advise the best way to do so.

To provide more context, I am looking for a solver in python to address Eq. (12) from paper Learning from Weak and Noisy Labels for Semantic Segmentation. It seems the problem is a generalization of the Basis Pursuit DeNoising (BPDN) problem with weighted L1-norm sparsity regularisation (different elements have different weights). Thank you in advance for your answer.

Sincerely, Raman

SamusRam commented 4 years ago

After examining your nice source code, I found self.wl1 = np.asarray(opt['L1Weight'], dtype=self.dtype). The L1Weight option was exactly what I was looking for! Thank you for the great library!