Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.

Include L-BFGS-B optimizer #2

Open
sebasv opened this issue Sep 28, 2018 · 7 comments
Open

Include L-BFGS-B optimizer #2

sebasv opened this issue Sep 28, 2018 · 7 comments

Comments

@sebasv
Copy link
Contributor

sebasv commented Sep 28, 2018

The title is pretty self-explanatory. I think the setup of this project is great and I would like to add a great optimizer to it. I'll start to work on this if no one else has.

@to266
Copy link
Owner

to266 commented Oct 4, 2018

Sure thing! Currently I don't have as much time to spend as I'd like, but BFGS would have been my next target, which would hopefully share a fair deal of code

@sebasv
Copy link
Contributor Author

sebasv commented Oct 4, 2018

I have to say, after working with it for a couple of days, the idea of a single Minimizer trait starts to seem less appropriate. Different algorithms need different signatures to allow for differentiation between linear/nonlinear constraints, box constraints, scalar/vector minimization, etc. This also always bothered me about the scipy.optimize module. What are your thoughts about dropping the singular signature constraint?

@to266
Copy link
Owner

to266 commented Oct 4, 2018

I was waiting for someone to play with the code a bit more to have some feedback regarding the interface. The goal was to kind of guess ahead what a somewhat reasonable interface might look like, build a single MVP for it, and then iteratively improving when more information is available, such as different minimizers that require different parameters, etc.

I think changing it is definitelly not off the table, however I expect the builder pattern to give a fair amount of flexibility. Could you post some examples where it's not very convenient or just straight-up impossible to use it?

As a side-note, feel free to ignore the Minimizer trait for now and just PR a working solution MVP. We can think what makes sense as a general interface then.

@to266
Copy link
Owner

to266 commented Oct 7, 2018

@sebasv I thought about it some more about the Minimizer trait and I see your point.
Do you think moving not-data to builders that are minimizer - specific make more sense?

Then all options will be stored and manipulated by the struct, and minimize would only take the data to be minimized on.

@sebasv
Copy link
Contributor Author

sebasv commented Oct 7, 2018

As of right now, that is what I would prefer. I'm implementing some algorithms in that direction, see how it works.

@sebasv
Copy link
Contributor Author

sebasv commented Oct 8, 2018

I ended up working mostly with Nelder-Mead because my problem seems to be too ill-posed for L-BFGS-B, but made some major changes in the project structure and the algorithm. The changes in the latter yield faster iterations and allows for convex constraints. I think I deviated too much from your codebase to make a sensible pull request, but maybe you can check out my code and we can cherry-pick changes to PR separately?
code

@to266
Copy link
Owner

to266 commented Oct 8, 2018

I doubt it's too different for a PR, but I'll have a look, thanks. None the less, great work! I'll definitely try to include any optimisations

@sebasv sebasv mentioned this issue Nov 12, 2018
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants