Fminunc. First order optimality not close to zero.
조회 수: 5 (최근 30일)
이전 댓글 표시
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
답변 (2개)
Alan Weiss
2013년 10월 14일
This section of the documentation might be relevant.
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 0
Matt J
2013년 10월 14일
편집: Matt J
2013년 10월 14일
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
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!