BFGS stopping criterion and numerical difference tuning
Posted: Mon Mar 21, 2022 6:14 am
Dear all,
I have a question on the BFGS optimiser in EViews 12 (build 2022-01-19). In particular, there have been many improvements in the BFGS implementations over the years that are present in other software packages as an optimiser parameter yet I have been unable to find them in EViews:
1. Numerical difference computation. The 'General Options --- Estimation Options' has two options, 'Speed' and 'Accuracy', and the help says: 'speed = fewer function evaluations, accuracy = more function evaluations'. Does it mean that the order of the Taylor series is higher (e.g. (f(x-2h) - 8f(x-h) + 8f(x+h) - f(x+2h))/(12h) for second-order accuracy)? Or does it imply that the number of iterations for the Richardson extrapolation is different, if it is used? What is the exact meaning of 'fewer or more evaluations'---how many are there for these options? I could not find it in the documentation.
2. Numerical difference epsilon. Given the fact that the smaller the numerical difference, the higher the accuracy loss due to finite machine precision, the user should be able to choose the numerical difference size (O(MachEps^(1/3)) is optimal according to some metrics) based on the problem. In some applications (e.g. Hessian computation for GARCH models), I have had wrong results due to the suboptimal default step size. Can the numerical difference step size be explicitly chosen in EViews?
3. BFGS stopping criterion. In principle, the optimiser can stop based on one of the following criteria:
--- The gradient is close to zero (e.g. Euclidean norm);
--- The relative or absolute function value improvement is close to zero (unable to reduce the function);
--- Step tolerance (maximum of the percentage changes in the scaled coefficients)---parameter `c` of `ml` in EViews 12.
--- Absolute convergence tolerance (tolerance for reaching zero for non-negative functions).
Do I understand it correctly that the gradient-based stopping criterion and stopping based on lack of value improvement is unavailable in EViews 12? I am having some trouble with coefficients close to zero in at state-space model because the relative argument value change if the value is close to zero is large, and for models with many parameters, convergence takes too much because there is no substantial improvement of the function value (<1e-8), yet the optimiser continues cruising in the high-dimensional space.
To cite a couple of examples, the GNU Scientific Library (GSL) has `gsl_multimin_test_gradient` to test the gradient, while R's `optim` has `abstol`, `reltol`, and `pgtol` (projected gradient tolerance), and Python's scipy has `optimize.fmin_bfgs` with `gtol` (gradient tolerance).
So is it possible to request the optimiser to stop based on the lack of function value reduction or gradient norm, not small argument value change?
Thank you very much in advance!
Yours sincerely,
Andreï V. Kostyrka
I have a question on the BFGS optimiser in EViews 12 (build 2022-01-19). In particular, there have been many improvements in the BFGS implementations over the years that are present in other software packages as an optimiser parameter yet I have been unable to find them in EViews:
1. Numerical difference computation. The 'General Options --- Estimation Options' has two options, 'Speed' and 'Accuracy', and the help says: 'speed = fewer function evaluations, accuracy = more function evaluations'. Does it mean that the order of the Taylor series is higher (e.g. (f(x-2h) - 8f(x-h) + 8f(x+h) - f(x+2h))/(12h) for second-order accuracy)? Or does it imply that the number of iterations for the Richardson extrapolation is different, if it is used? What is the exact meaning of 'fewer or more evaluations'---how many are there for these options? I could not find it in the documentation.
2. Numerical difference epsilon. Given the fact that the smaller the numerical difference, the higher the accuracy loss due to finite machine precision, the user should be able to choose the numerical difference size (O(MachEps^(1/3)) is optimal according to some metrics) based on the problem. In some applications (e.g. Hessian computation for GARCH models), I have had wrong results due to the suboptimal default step size. Can the numerical difference step size be explicitly chosen in EViews?
3. BFGS stopping criterion. In principle, the optimiser can stop based on one of the following criteria:
--- The gradient is close to zero (e.g. Euclidean norm);
--- The relative or absolute function value improvement is close to zero (unable to reduce the function);
--- Step tolerance (maximum of the percentage changes in the scaled coefficients)---parameter `c` of `ml` in EViews 12.
--- Absolute convergence tolerance (tolerance for reaching zero for non-negative functions).
Do I understand it correctly that the gradient-based stopping criterion and stopping based on lack of value improvement is unavailable in EViews 12? I am having some trouble with coefficients close to zero in at state-space model because the relative argument value change if the value is close to zero is large, and for models with many parameters, convergence takes too much because there is no substantial improvement of the function value (<1e-8), yet the optimiser continues cruising in the high-dimensional space.
To cite a couple of examples, the GNU Scientific Library (GSL) has `gsl_multimin_test_gradient` to test the gradient, while R's `optim` has `abstol`, `reltol`, and `pgtol` (projected gradient tolerance), and Python's scipy has `optimize.fmin_bfgs` with `gtol` (gradient tolerance).
So is it possible to request the optimiser to stop based on the lack of function value reduction or gradient norm, not small argument value change?
Thank you very much in advance!
Yours sincerely,
Andreï V. Kostyrka