[Insight-users] LBFGSB Optimizer

Johnson, Hans J hans-johnson at uiowa.edu
Tue Mar 26 13:13:22 EDT 2013


Tim,

You proposal seems very reasonable.  Will you please provide a patch with
your suggested improvement?

http://www.itk.org/Wiki/ITK/Git/Develop


I've made a JIRA ticket to track this request.
https://issues.itk.org/jira/browse/ITK-3014

Thanks,

Hans

=================================================================
Hans J. Johnson, Ph.D.
Assistant Professor, Department of Psychiatry

Mailing Address:
W274 GH                             Email: hans-johnson at uiowa.edu
200 Hawkins Drive                   Phone: (319) 353 8587
The University of Iowa
Iowa City, IA 52242






-----Original Message-----
From: Tim Allman <dr.tim.allman at gmail.com>
Date: Tuesday, March 26, 2013 9:59 AM
To: Insight Users <insight-users at itk.org>
Subject: [Insight-users] LBFGSB Optimizer

I wanted to set the cost function convergence criterion to zero in my
code in order to turn off termination due to this criterion. The code
threw an exception that originated in this code.

void
LBFGSBOptimizer
::SetCostFunctionConvergenceFactor(double value)
{
   if ( value < 1.0 )
     {
     itkExceptionMacro("Value " << value
                                << " is too small for
SetCostFunctionConvergenceFactor()"
                                << "a typical range would be from 1.0 to
1e+12");
     }

The authors of the algorithm and the Fortran code that ITK uses specify
in their example driver the following where factr is the parameter that
is eventually set by SetCostFunctionConvergence Factor() and pgtol is
the parameter that is set by SetProjectedGradientTolerance(). They make
it clear here and in other docs that setting one or the other to zero is
expected use. You can even set them both to zero if you have a
termination criterion in the driver.

Effectively, the ITK class is the driver and perhaps a better behaviour
for it would be for LBFGSBOptimizer::StartOptimization() to throw if
both arguments were zero but be happy if only one were. Does this sound
reasonable?

c     factr is a DOUBLE PRECISION variable that must be set by the user.
c       It is a tolerance in the termination test for the algorithm.
c       The iteration will stop when
c
c        (f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} <= factr*epsmch
c
c       where epsmch is the machine precision which is automatically
c       generated by the code. Typical values for factr on a computer
c       with 15 digits of accuracy in double precision are:
c       factr=1.d+12 for low accuracy;
c             1.d+7  for moderate accuracy;
c             1.d+1  for extremely high accuracy.
c       The user can suppress this termination test by setting factr=0.
c
c     pgtol is a double precision variable.
c       On entry pgtol >= 0 is specified by the user.  The iteration
c         will stop when
c
c                 max{|proj g_i | i = 1, ..., n} <= pgtol
c
c         where pg_i is the ith component of the projected gradient.
c       The user can suppress this termination test by setting pgtol=0.
c

Thanks,
Tim

--
Tim Allman, Ph.D.
35 Margaret Street,
Guelph Ontario N1E 5R6
Canada




________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-users mailing list