Controlling the optimiser
Setting parameters to control convergence
With the default optimiser (LBFGSB) and DE solver (DVODE)
it is possible to control the fitting in a number of ways,
as follows.
- Altering the accuracy of approximating derivatives of
the objective function by finite differences.
- Altering the strictness of the tolerance conditions
for concluding that a local minimum has been located.
- Altering the convergence critera for advancing the solution
of differential equations from the initial position.
As each fitting proceeds, the iterations are written to
w_qnfit.err, so the process of optimisation can be investigated
retrospectively, and so the path taken during the optimisation
can be plotted on the contours of the objective function
at the solution point.
Convergence in fitting is assumed when the relative change in objective
function, or the norm of the projected gradient vector become small.
In difficult cases you might try low or high precision but most
of the time medium precision will suffice. You will be warned
if there seems to be anything abnormal about the minimisation,
which is usually due to a wrong model or bad starting values.
Controlling the ODE solver (errors written to w_qnfit.err)
If you know the problem is not stiff you should use the Adams
method, but if the system is stiff then use the BDF method
which requires a Jacobian. If fitting is quicker when using an
estimated Jacobian then the algebra is wrong in the exact one.
Note that the last parameter is an integration constant which
can be estimated or fixed. This program assumes that you are
integrating from t = 0 so, if this is not the case, you will
have to re-scale your problem. In the case of errors, consult
w_qnfit.err, then simulate with MAKDAT. To avoid slow running
use a mixed error test with TOL around 0.001, unless you really
need an absolute or relative error test.
If the NAG library E04 or D02 routines are used instead of
LBFGSB and DVODE, convergence and error data may not written to
w_qnfit.err as just described. Instead, some output may be written to
the file nag_ifail.txt.
Back to Help Menu or End Help