-
Notifications
You must be signed in to change notification settings - Fork 5
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
Generalize procedure to constrain parameter domain #246
Comments
I think there are three things when it comes to constraints, at least what we thought about, practically:
I'll try to get up an example so that you can maybe try out these things directly and see if that fits the need |
Thanks for your thoughts! |
Yes, I agree on 1, that should work out well. For two, while these are technically just a special case, they serve numerically also an important and quite different purpose: They restrict the search space (and therefore many optimizers profit from it, some global ones even require it. Locals often either need an initial step size or boundaries). Also, the implementation is trivial, compared to 3. But that should not be hard to do in this sense as it is just keeping track of boundaries for the minimizer (so they don't need to be dragged into the computation). For three, in principle yes. In practice rather not, because many minimizers do not support arbitrary constraints (and if they do, they don't do magic: they just make sure that the costraint is minimally violated). Also, I don't think there is any gain compared to adding it to the likelihood except of it the very best case some speedup. However, it is more complicated usually to interface with the minimizer. Lastly, it has to be somewhere in the likelihood (or be respected by everyone), as even with a minimizer constraint, it indirectly goes into it, just not explicit (which can be dangerous, as maybe it won't be in the error estimate then if it is not explicitly added; the likelihood is our holy grail in the end). |
Currently, it's only possible to fix or 'unfix' parameters. Minuit allows setting parameter limits, while some of the scipy and nlopt allow more general constraints (
bounds
argument and non-linear constraints).The text was updated successfully, but these errors were encountered: