Step size in Math::Minimize

Hi,

I have the following problem with my chi2 fit. I define the chi2 as squared distance of point of a TGraph with a TF1 function f (normalized by the error) - as usual. The function f depends on a free parameter p. The function f for a specific value of p is calculated using points that are tabulated for several values of p. The precision of this table is 10-3 in p.

How can I tell the Minimizer to take only steps of this size in p? I tried putting the step size to 0.001

double step[4] = {0.001,0.01,0.01,0.01};
min->SetVariable(0,“parameter”,variable[0],step[0]);

but the Minimizer still tries to calculate the function for p values too fine for my interval. As a result, it does not find a different chi2 value for e.g p=0.800 and p=0.7999 and is confused.

The other settings are

const char * minName = “Minuit2”;
const char algoName = “” ;
int randomSeed = -1;
ROOT::Math::Minimizer
min = ROOT::Math::factory::CreateMinimizer(minName, algoName);
min->SetMaxFunctionCalls(1000000); // for Minuit/Minuit2
min->SetTolerance(0.01);
min->SetPrecision(0);
min->SetPrintLevel(1);

Thank you very much!

Hi,

You cannot use Minuit if the function is not continuous in both value and derivatives. In your case by being evaluated only on some points the derivatives cannot be computed.
You can either interpolate the function between the different points to make continuous in its function value and its derivatives or use a different minimiser algorithm. You might try simplex or simulated annealing or the
genetic minimiser. All of them, since they do not use the derivatives will be much slower and requiring a much larger number of function calls.

Best Regards

Lorenzo