Skip to content
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

drop Optim? #83

Closed
PaulSoderlind opened this issue May 6, 2020 · 2 comments · Fixed by #84
Closed

drop Optim? #83

PaulSoderlind opened this issue May 6, 2020 · 2 comments · Fixed by #84

Comments

@PaulSoderlind
Copy link
Contributor

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:

hGSS = golden_section_searchX(hlb, hub,0.0001) do h
... [current loss function]
end

function golden_section_searchX(f, a, b, ϵ)
... [standard code, 16 lines]
end
@tpapp
Copy link
Collaborator

tpapp commented May 7, 2020

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
Copy link
Contributor

pkofod commented May 10, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants