Change minimisation method in Minute #1811
-
Dear Developers, Is there a way to change to some of the other iminuite methods for minimization? At least in the newest 2.x iminuite version, iminuite has the simplex() algorithm for minimization. That helped me a lot to get a more robust fit. But I do not know how I can set this in pyhf. The change in the method could also help mitigate the toy-based CLs scan problems. Also, some iminuite functions such as scan() could help users analyze their fit. It would be nice to have easy access to those functions without reprogramming pyhf functionalities. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @thomas-kraetzschmar, I think it depends a bit here at what level you want to enter. The core devs can correct me, but I think if you are operating with the If you skip the I think making the minimization approach more flexible is an interesting idea. It is not clear to me at the moment how the API for that should look. There are many potential steps with different algorithms and different options for each step that a user may in theory want to be able to use. As a slightly tangential point, issues with Migrad minimization tend to be related to model-building, and they can usually be resolved by suitable changes to the model. Frequently that means avoiding negative yield predictions with a different modifier setup, see e.g. #1695. |
Beta Was this translation helpful? Give feedback.
You can always write your own (custom) optimizer following
opt_minuit.py
and load it in and use it. It should be usable - or just override certain functions of the existing class implementation. If you have an idea for an API you'd like, or would like to submit a PR, go ahead. This almost looks like a feature request, but if you have a specific idea of how you'd like to see the API, let u…