Closed PaulSoderlind closed 3 years ago
I am sympathetic to this, cf JuliaNLSolvers/Optim.jl/issues/744.
@pkofod, is there any change of moving the univariate routines to a smaller, lighter package?
If not, then we could think about creating a small package along the lines of Roots.jl for these methods so that they could be reused.
@pkofod, is there any change of moving the univariate routines to a smaller, lighter package?
I havn't specifically thought about doing it, but in principle they could. The thing is, with the way package loading works in Julia, it'll never be instantaneous to have dependencies, so if it's very important to have low using
times, you need to self-host the code.
Optim is a rather heavy dependency, especially since the optimisation problem in
kde_lscv
appears to be fairly straightforward.I therefore experimented with a simple golden section search - and it works well. It seems as if Optim could be dropped and the short golden section search code (a total of 18 lines) could be added to the package.
The key parts of the code are a follows: