-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add ability to pass options to SciPy minimizers #1060
base: develop
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
tests/test_scipy.py
Outdated
with pytest.raises(ValueError): | ||
m.scipy(options=[]) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to also have a test cases that shows the benefit of setting options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will work on adding this; the other changes have been made.
Thanks, I am happy to include this patch, after some refinement. |
Co-authored-by: Hans Dembinski <[email protected]>
Co-authored-by: Hans Dembinski <[email protected]>
The various SciPy minimizers have different options that can be adjusted to change and improve performance. Presently, the iminuit API does not allow passing options to these minimizers, which limits their usefulness for some minimization problems (specifically mine). I added a parameter to minuit.scipy() to allow passing options to scipy.optimize.minimize(). It keeps the existing default options that were being passed and allows for these defaults to be overwritten by the user.