#include <drop_convergence_test.h>
Public Member Functions | |
| drop_convergence_test (SizeType n_test_points=5, FloatType max_drop_eps=FloatType(1.e-5), FloatType iteration_coefficient=FloatType(2)) | |
| Constructor. | |
| SizeType | n_test_points () const |
| Number of most recent objective function values used in fit of straight lines (as passed to the constructor). | |
| FloatType | max_drop_eps () const |
| Base tolerance for test of drop of objective function (as passed to the constructor). | |
| FloatType | iteration_coefficient () const |
| Tolerance for comparison of slopes (as passed to the constructor). | |
| bool | operator() (FloatType f) |
| Execution of the convergence test. | |
| af::shared< FloatType > | objective_function_values () const |
| Values of the objective function monitored so far. | |
| FloatType | max_drop () const |
| Maximum drop monitored so far. | |
This test monitors an objective function f in the course of the minimization to determine when it has reached a plateau. The test is independent of the absolute scale of the objective function.
slope be the slope of this fitted line. Convergence is detected if:
-slope <= max_drop() * max_drop_eps()
number_of_iterations^iteration_coefficient()
Note that with iteration_coefficient() > 1 this test becomes increasingly tolerant with the number of iterations. The rationale is that the slope will not change very much for parameters that are already close to the optimum. | drop_convergence_test | ( | SizeType | n_test_points = 5, |
|
| FloatType | max_drop_eps = FloatType(1.e-5), |
|||
| FloatType | iteration_coefficient = FloatType(2) | |||
| ) | [inline, explicit] |
Constructor.
See the class details for an outline of the convergence detection algorithm and the meaning of the parameters.
References drop_convergence_test::n_test_points(), and SCITBX_ASSERT.
| bool operator() | ( | FloatType | f | ) | [inline] |
Execution of the convergence test.
Note that at least n_test_points() executions are required before convergence will be evaluated.
References SCITBX_ASSERT.
1.5.6