New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement scipy.optimize's dcsrch (a modified version of Minpack2's code) #155
Comments
I'm not 100% sure, but I think the original code (which, if I've followed it all correctly) is GPL licensed (https://software.sandia.gov/opt++/opt++2.4_doc/html/index.html, which I think covers the license for Minpack2 (https://software.sandia.gov/opt++/opt++2.4_doc/html/minpack2_8h.html this shows a header file! Be mindful when clicking)). |
According to https://github.com/scipy/scipy/blob/master/LICENSES_bundled.txt#L26, they use BSD-licensed code. The readme shows the website that hosts the source code: https://github.com/scipy/scipy/tree/master/scipy/optimize/lbfgsb_src. Does that mean the L-BFGS-B authors have incorrectly attributed the Minpack2 code? |
Not necessarily, they may have implemented it from scratch/referenced a paper/done a clean-room implementation. I'm not a licensing expert, so I just wanted to chime in with what I found. Since LineSearches.jl is MIT though, it'd be a shame if such a useful addition would introduce GPL. |
The implementation paper (algorithm 778: a L-Bfgs-B algorithm) says that the line search used is MoreThuente |
https://github.com/JuliaNLSolvers/LineSearches.jl/blob/master/src/morethuente.jl seems to be based on cvsrch, which is not dcsrch. |
While doing a benchmark for Julia vs Python in JuliaNLSolvers/Optim.jl#922, I have found scipy.optimize's
dcsrch
(so I use PyCall to do scipy.optimize.minimize on a Julia model) to be faster than HagerZhang and BackTracking when the maximum linesearches is limited to 20.While
dcsrch
is probably not a faster general purpose line search algorithm, I think having it implemented would ease the transition for people who are migrating their code from Python+SciPy to Julia+Optim.jl.Some info about
dcsrch
:Code implementation: https://github.com/scipy/scipy/blob/4ec6f29c0344ddce80845df0c2b8765fc8f27a72/scipy/optimize/lbfgsb_src/lbfgsb.f#L3326.
The text was updated successfully, but these errors were encountered: