[ADMB Users] Bug? Limited memory quasi newton terminating with the wrong gradient
lennart at ii.uib.no
lennart at ii.uib.no
Thu Mar 11 06:37:12 PST 2010
Hi,
I have been doing some simple testing of ADMB to see if I could get limited memory quasi-newton to work. However, on one problem it reports the initial solution as the final solution and the gradient as zero, both of which are wrong. If I don't use -lmn, then everytying is fine. I'm wondering if this is just a problem with my installation, or if there is a bug somewhere in ADMB.
In more detail:
ADMB version: 9.1 (December 31, 2009)
Architecture: 64 bit, four processors of type Intel(R) Xeon(R) CPU X3330 @ 2.66GHz
OS: Linux
Source code compiled with either make linux or make linux-64 (to the best of my recollection probably the first one)
The function is the Rosenbrock function (this one http://en.wikipedia.org/wiki/Rosenbrock_function ). If I compile and run with the standard optimization method then I get:
./rosenbrock
Initial statistics: 2 variables; iteration 0; function evaluation 0
Function value 2.4200000e+01; maximum gradient component mag -2.1560e+02
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 -1.20000 -2.15600e+02 | 2 1.00000 -8.80000e+01 |
Intermediate statistics: 2 variables; iteration 10; function evaluation 17
Function value 2.4618636e+00; maximum gradient component mag -1.0410e+01
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 -0.53029 -1.04105e+01 | 2 0.24656 -6.93000e+00 |
2 variables; iteration 20; function evaluation 29
Function value 1.9826294e-01; maximum gradient component mag -3.0528e+00
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 0.58171 2.71511e+00 | 2 0.32313 -3.05278e+00 |
2 variables; iteration 30; function evaluation 42
Function value 1.0044269e-03; maximum gradient component mag 7.8688e-01
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 0.97657 7.86878e-01 | 2 0.95156 -4.26868e-01 |
- final statistics:
2 variables; iteration 36; function evaluation 48
Function value 4.0456e-13; maximum gradient component mag 9.5059e-06
Exit code = 1; converg criter 1.0000e-04
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 1.00000 9.50595e-06 | 2 1.00000 -5.33050e-06 |
Estimating row 1 out of 2 for hessian
Estimating row 2 out of 2 for hessian
...which is the right solution. If, however, I use limited memory quasi-newton, then the following happens:
./rosenbrock -lmn 5
Initial statistics: 2 variables; iteration 0; function evaluation 1
Function value 2.4200e+01; maximum gradient component mag 2.1560e+02
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 -1.20000 -2.15600e+02 | 2 1.00000 -8.80000e+01 |
final statistics: 2 variables; iteration 1; function evaluation 2
Function value 1.7134e+02; maximum gradient component mag 2.6055e+02
Var Value Gradient |Var Value Gradient |Var Value Gradient
1 -0.27415 1.40311e+02 | 2 1.37790 2.60547e+02 |
Estimating row 1 out of 2 for hessian
Estimating row 2 out of 2 for hessian
Which is premature termination. That in itself does not necessarily imply a bug, but if I look at the .par-file, it reads:
# Number of parameters = 2 Objective function value = 24.2000 Maximum gradient component = 0.00000
# x1:
-1.20000000000
# x2:
1.00000000000
In other words, it reports the initial solution as the final solution,
and the corresponding gradient as identically zero, both of which are clearly wrong.
The code etc is:
rosenbrock.tpl:
DATA_SECTION
init_number const_1;
init_number const_2;
PARAMETER_SECTION
init_number x1;
init_number x2;
vector f_vec(1,2);
objective_function_value f;
PRELIMINARY_CALCS_SECTION
PROCEDURE_SECTION
f_vec(1) = const_1*(x2 -x1*x1);
f_vec(2) = const_2*(1-x1);
f = norm2(f_vec);
REPORT_SECTION
TOP_OF_MAIN_SECTION
rosenbrock.dat:
# Parameters for rosenbrock function, that is, constants
10 1
rosenbrock.pin:
# Starting values for rosenbrock
-1.2 1
Best regards,
Lennart
More information about the Users
mailing list