[Insight-developers] Proper use of SetCostFunctionConvergenceFactor

Luis Ibanez luis.ibanez at kitware.com
Tue Apr 8 11:32:45 EDT 2008


Hi Bill,

That was a great catch !,

Thanks for fixing the parameter values.

A check has just been added to the itkLBFGSBOptimizer
in this method. Now and exception is thrown if the value
is less than 0.1.

This has been committed to CVS.


Certainly, choosing proper parameters for the convergence
has been one of the main challenges when using this optimizer.


    Luis


---------------------
Bill Lorensen wrote:
> Guys,
> 
> I noticed that a couple of registration examples that use the lbfgsb
> optimizer were setting the cost function convergence factor as though
> it were an epsilon. Actually, it is a factor that is multiplied times
> the machine precision to compute. Hence, a number < 1 (some examples
> used 1.e-35) result in a tolerance below the precision of the machine.
> As stated in the comments of the optimizer:
> 
> /** Set/Get the CostFunctionConvergenceFactor. Algorithm terminates
>    * when the reduction in cost function is less than factor * epsmcj
>    * where epsmch is the machine precision.
>    * Typical values for factor: 1e+12 for low accuracy;
>     * 1e+7 for moderate accuracy and 1e+1 for extremely high accuracy.
>     */
> 
> I fixed two examples. They were occasionally failing on some
> platforms. On the Borland platform at least one was aborting on a
> divide by zero.
> 
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/Registration/DeformableRegistration12.cxx?root=Insight&r1=1.9&r2=1.10
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Examples/Registration/DeformableRegistration8.cxx?root=Insight&r1=1.22&r2=1.23
> 
> Maybe we should put a check in the Set method to prevent future misuse
> of this variable.
> 
> Bill
> 


More information about the Insight-developers mailing list