larsmans / pylbfgs

Python/Cython wrapper for liblbfgs
MIT License
44 stars 38 forks source link

Using OWL-QN correctly #7

Open humatic opened 8 years ago

humatic commented 8 years ago

I'm trying to minimize the L1 norm of x for the system Ax==b using the OWL-QN algorithm. However, it's not clear to me from the documentations of libLBFGS and pyLBFGS how to do this. I'm assuming that we should use the fmin_lbfgs(...) method, but how to define the callable f and its gradient vector g? Any quick suggestions?

mx-strk commented 7 years ago

Yeah, same here. Could somebody explain how to set the property for OWL-QN correctly? I think that the function handle f is independent of the chosen algorithm. To my understanding, this can be set somehow. But does anybody knows how?

humatic commented 7 years ago

@mettmexx It has been over a year since I struggled with this, so I don't really remember all of the details. However I did ultimately figure it out (for my use-case). Maybe take a look at my alternative, Python 3 version "pylbfgs" here: https://bitbucket.org/rtaylor/pylbfgs Also, I use it in an actual project here: http://www.pyrunner.com/weblog/2016/05/26/compressed-sensing-python/ No promises, but those links might help you. Cheers!