[Insight-developers] New GetStopConditionDescription() for itkOptimizers
Bill Lorensen
bill.lorensen at gmail.com
Wed Jun 10 12:53:28 EDT 2009
Folks,
I'd like to add a new method to itkOptimizer and its subclasses. The new method,
GetStopConditionDescription() returns a const string that describes
the stop condition of the optimizers. Currently, each optimizer
returns a StopCondition that is an enum. The new method contains
useful information depending on the optimizer. The itkOptimizer base
class method returns "Optimizer did not provide a stop condition
description".
I instrumented the Examples/Registration examples to report the stop
condition description. Here is a sampling:
GradientDescentOptimizer: Maximum number of iterations (200) exceeded.
RegularStepGradientDescentOptimizer: Step too small after 17
iterations. Current step (0.0078125) is less than minimum step (0.01).
RegularStepGradientDescentOptimizer: Gradient magnitude tolerance met
after 43 iterations. Gradient magnitude (7.75281e-05) is less than
gradient magnitude tolerance (0.0001).
RegularStepGradientDescentOptimizer: Maximum number of iterations
(200) exceeded.
RegularStepGradientDescentOptimizer: Step too small after 22
iterations. Current step (0.00078125) is less than minimum step
(0.001).
GradientDescentOptimizer: Maximum number of iterations (200) exceeded.
AmoebaOptimizer: Both parameters convergence tolerance (0.25) and
function convergence tolerance (0.001) have been met in 27 iterations.
AmoebaOptimizer: Both parameters convergence tolerance (0.1) and
function convergence tolerance (0.001) have been met in 53 iterations.
LBFGSOptimizer: Failure
LBFGSBOptimizer: Function tolerance reached after 32 iterations. The
relative reduction of the cost function <= 2.22045e-09 =
CostFunctionConvergenceFactor (1e+07) * machine precision
(2.22045e-16).
LBFGSBOptimizer: Function tolerance reached after 29 iterations. The
relative reduction of the cost function <= 2.22045e-09 =
CostFunctionConvergenceFactor (1e+07) * machine precision
(2.22045e-16).
Some need more work, e.g. LBFGSOptimizer.
Bill
More information about the Insight-developers
mailing list