Minimization of function with complicated domain

Hi all,
I want to find a minimum of a multi-dim function with a quite complicated domain in parameter space.
It means that for some points is the function defined and for some others is not.
Without doing anything the function output for ill-defined points is typically something like ±inf or nan.

From my experience, the minimizer gets stack when it enters such a point and isn’t able to return back.
Is there some way how to tell ROOT, to ignore such a point?
One idea which I had was to assign some big value to the function in ill-defined points (replacing inf/nan with a big number) so that it cannot be considered as a minimum.
However, in this case, the minimization algorithm has troubles to deal with discontinuities.

Is there some better way how to tell ROOT to avoid points where the function is not defined when looking for a minimum?
Thanks a loot.


What you would need is a minimiser that support non trivial constraints in the parameter space. Instead in ROOT, what we have (e.g. Minuit) it supports only simple bounds in the parameters (e.g. A < p < B).

Adding penalty terms to the function or large value could be a possibility, and it might work if the minimiser succeeds to move away from the bad regions.
Otherwise you would need to use some other tools outside ROOT that support constraint minimisation. There are several good constraint optimisers (e.g. from the Nag library), but they are not free, but I think there are also some open source implementations available

Best regards


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.