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

ENH: Allow to choose line-search parameters in related optimization algorithms #19075

Closed
paulestano opened this issue Aug 16, 2023 · 3 comments · Fixed by #19081
Closed

ENH: Allow to choose line-search parameters in related optimization algorithms #19075

paulestano opened this issue Aug 16, 2023 · 3 comments · Fixed by #19081
Labels
enhancement A new feature or improvement scipy.optimize
Milestone

Comments

@paulestano
Copy link
Contributor

paulestano commented Aug 16, 2023

Is your feature request related to a problem? Please describe.

While looking at #18481 I noticed it is not yet possible to choose c1 and/or c2 parameters of the line-search algorithm used within multiple optimization algorithms (CG, BFGS, NEWTON-CG) from the scipy.optimize.minimize API.

Describe the solution you'd like.

Add c1 and c2 parameters with default values to 1e-4 and 0.9 to the signature of _minimize_newtoncg, _minimize_cg and _minimize_bfgs .

Describe alternatives you've considered.

I am not mastering the whole scipy.optimize code base but I can't see any other straightforward one.

Additional context (e.g. screenshots, GIFs)

No response

@paulestano paulestano added the enhancement A new feature or improvement label Aug 16, 2023
@andyfaff
Copy link
Contributor

This is already covered by #18977 for BFGS

@paulestano
Copy link
Contributor Author

I was not aware of this PR. Is there any reason for not exposing c1 and c2 for other algorithms than BFGS?

@dschmitz89
Copy link
Contributor

I don't think there are reasons against it. So far just no one looked into it.

Would you be interested in submitting a PR? #18977 can serve as a helpful example.

andyfaff added a commit that referenced this issue Aug 20, 2023
ENH: optimize: c1 and c2 of scalar_search_wolfe to cg and newton-cg
@j-bowhay j-bowhay added this to the 1.12.0 milestone Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement scipy.optimize
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants