Re: Minuit2

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Fri, 4 Sep 2009 19:09:56 +0200


Hi Patrick,

  When the maximum number of fcn is reached, there is some procedure in Migrad (when the strategy is greater than 1) to try to continue the minimization with a better evaluation of the Hessian. This might explain why it is continuing for a while although the max- iteration number is passed.
If you want to stop it earlier you can try giving a lower value of maxfcn ( 30% less should be enough).

Regards

    Lorenzo
On Sep 4, 2009, at 6:42 PM, Patrick Dupre wrote:

> Thank Lorenzo,
>
> In fact, I was wrong because the NFcn returned was the one of Hesse
> and
> not of the minimization.
>
> By the way, I set maxfcn, but Minimize has a strange behavior.
> 1) It does not seem to stop when maxfcn is reach.
> 2) If it passes over, then it return: Minuit did not converge
>
> What I would like is to really stop the minimization at maxfcn.
>
> Regards.
>
>
>>
>> Hello Patrick,
>>
>> UserState ().NFcn () or FunctionMinimum::NFcn() returns the total
>> number of function calls
>> (the one that is also printed at the end of the minimization) and I
>> guess is the one you want to have.
>>
>> States().size() is the total number of iterations performed by
>> Migrad. For each iteration, new parameter values are found, new
>> values of the gradient are calculated and the Hessian is updated
>> using this information. Therefore for each iteration you have few
>> function calls depending on the number of parameters (at least 2 *
>> NumberOfParams )
>>
>> Best Regards
>>
>> Lorenzo
>>
>> -----Original Message-----
>> From: owner-roottalk_at_root.cern.ch on behalf of Patrick Dupre
>> Sent: Thu 9/3/2009 11:36 PM
>> To: roottalk_at_root.cern.ch
>> Subject: [ROOT] Minuit2
>>
>> Hello,
>>
>> How do I get the number of iterations run by Minuit2 ?
>> I tried:
>> 1) UserState ().NFcn () ;
>> but it return 62.
>> 2) States().size () ;
>>
>> I need to get:
>> # of function calls: 75
>>
>> Thank for your help.
>>
>>
>
> --
> ---
> =
> =
> =
> =
> ======================================================================
> Patrick DUPRÉ | |
> Department of Chemistry | | Phone: (44)-
> (0)-1904-434384
> The University of York | | Fax: (44)-
> (0)-1904-432516
> Heslington | |
> York YO10 5DD United Kingdom | | email: pd520_at_york.ac.uk
> =
> =
> =
> =
> ======================================================================
Received on Fri Sep 04 2009 - 19:10:30 CEST

This archive was generated by hypermail 2.2.0 : Sun Sep 06 2009 - 17:50:02 CEST