Minuit2::FunctionMinimum

Hi ,

I have a simple question about FunctionMinimum. I have the following line in my code:

MnMigrad migrad(*fcn, upar); 
FunctionMinimum min=migrad();
  • If min.IsValid() is zero does that means minimization doesn’t converge?

  • how I can set the Maximum Iteration and get the minimum value of from iteration.

Thanks,
sushil

Hi,

I think I found the answer for my earlier question.

Now only have one more query, how I could get the fitted parameters from it.

Thanks
sushil

For reference

Yes if it is false, means the found function minimum is not valid. The possible reasons are:

  • edm is above the maximum value given ( min.IsAboveMaxEdm() ) and the iteration stopped for an error in Minuit (typically a precision problem in computing the objective function)

  • The maximum number of function call has been reached min.HasReachedCallLimit()

  • computing the Hessian or inverting it to compute the covariance matrix failed min.HesseFailed();

By calling

FunctionMinimum min=migrad(maxfcn, tolerance);

where you can pass also the maximum number of function calls (maxfcn) and the tolerance (tolerance);

You get the function minimum value, by calling

double fmin =  min.Fval(); 

Lorenzo