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

How to define different f and g in sporco.admm.admm.ADMM? #13

Closed Luojiaqimath closed 4 years ago

Luojiaqimath commented 4 years ago

Hi, I want to know if the problem cannot be converted into the standard form you listed in the examples, but only into the standard ADMM form. How do I modify the target function f and g in sporco.admm.admm.ADMM?

bwohlberg commented 4 years ago

You need to derived your own class from sporco.admm.admm.ADMM and override a number of methods within that class. The methods that define functions f and g are obfn_f and obfn_g respectively, but you also need to override a number of other functions to obtain a properly functioning solver. You can also take a look at class sporco.admm.spline as an example.