Minimum reached and First-Order Optimality non zero
Mostra commenti meno recenti
Good morning everyone,
I'm using fminunc to set to zero an objective function that depends on one variable only, which happens to be an efficiency (so that I can guess a good starting value and assess if the solution I get is reliable).
I find the value that pushes to zero my objective function and it is reasonable. Nevertheless, when displaying the optimization steps, the label first-order optimality isn't zero.

If I look at stopping criteria I get the following:

Now, my question is: what's the difference between the first-order optimality and the first-order optimality measure? I know that the second one should be the maximum of the gradient (like the infinity norm), but in my case, since I have only one variable, it should be the simple derivative... But what about the first one?
Hope my question does not sound to silly,
thanks
Roberto
Risposte (1)
Alan Weiss
il 5 Lug 2018
1 voto
The difference is in the term relative. Because the initial first-order optimality measure is so high, the relative first-order optimality measure at the end is low, even though the derivative is not all that near zero. The relative measure is the ratio of the measure to the initial measure.
To get a better final value, rerun the solver starting at the solution.
Alan Weiss
MATLAB mathematical toolbox documentation
3 Commenti
Roberto Galimberti
il 6 Lug 2018
Alan Weiss
il 6 Lug 2018
Your method seems OK.
You could also try to use lsqnonlin instead of fminunc. In that case, you would have as the objective function ( variable - constant ), not the square. See the lsqnonlin function reference page. This will probably give you even more reliable results, as it is the solver for your problem's form.
Alan Weiss
MATLAB mathematical toolbox documentation
Roberto Galimberti
il 9 Lug 2018
Categorie
Scopri di più su Solver Outputs and Iterative Display in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

