Fminunc. First order optimality not close to zero.

3 visualizaciones (últimos 30 días)
Fio
Fio el 13 de Oct. de 2013
Editada: Matt J el 14 de Oct. de 2013
The results from my code are:
%options = optimset(options, 'TolCon',1e-10);
%options = optimset(options, 'TolFun',1e-10);
%options = optimset(options, 'TolX',1e-10);
Diagnostic Information
Number of variables: 3
Functions Objective and gradient: ola_2unc/Lik Hessian: finite-differencing (or Quasi-Newton)
Algorithm selected large-scale: trust-region Newton
__________________________________________________________ End diagnostic information
Norm of First-order
Iteration f(x) step optimality CG-iterations
0 22602 420
1 22601.1 0.0575789 29.4 1
2 22601.1 0.0258237 29.4 1
3 22601.1 0.00645593 29.4 0
4 22601.1 0.00161398 29.4 0
5 22601.1 0.000403496 29.4 0
6 22601.1 0.000100874 29.4 0
7 22601.1 2.52185e-05 29.4 0
8 22601.1 6.30462e-06 29.4 0
9 22601.1 1.57616e-06 29.4 0
10 22601.1 3.94039e-07 29.4 0
11 22601.1 9.85097e-08 29.4 0
12 22601.1 2.46274e-08 29.4 0
13 22601.1 6.15686e-09 29.4 0
14 22601.1 1.53921e-09 29.4 0
15 22601.1 3.84803e-10 29.4 0
16 22601.1 9.62009e-11 29.4 0
Local minimum possible.
fminunc stopped because the size of the current step is less than the selected value of the step size tolerance.
Elapsed time is 1072.305964 seconds.
exitflag =
2
output =
iterations: 16
funcCount: 17
cgiterations: 2
firstorderopt: 29.3953
algorithm: 'large-scale: trust-region Newton'
message: [1x419 char]
constrviolation: []
I would like to ask:
I have read that first order optimality should be close to zero. This is not achieved in my code. What does it mean? Is there a way to improve the results?
Thank you in advance.
  1 comentario
Matt J
Matt J el 13 de Oct. de 2013
We'll probably need to see the objective function code.

Iniciar sesión para comentar.

Respuestas (2)

Alan Weiss
Alan Weiss el 14 de Oct. de 2013
Alan Weiss
MATLAB mathematical toolbox documentation

Matt J
Matt J el 14 de Oct. de 2013
Editada: Matt J el 14 de Oct. de 2013
Check the Hessian where the algorithm stops
[x,fval,exitflag,output,lambda,grad,hessian]= fmincon(...)
If the Hessian is super-large (whether for good reasons or bad), that could explain why the algorithm takes super-small steps, even when the first-order derivatives are not small.
See also this similar post

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by