Does line search in "fminunc" use the directional derivatives? And can this be turned off?

Hello!
I currently try to solve an unconstrained minimization problem where the objective is computed by simulating the system of interest. During simulation, I also compute the corresponding objective gradient, however, this is more expensive than just computing the objective value.
Currently, I use the following options for "fminunc":
options = optimoptions( 'fminunc', 'GradObj', 'on', 'Display', 'iter', 'Algorithm', 'quasi-newton' );
I tried using "nargsout" to query the number of requested output arguments and only compute the gradient if "nargsout > 1".
However, it seems that the gradient is also required during the line search, and thus, there is no speed up. Is there are way to change this behavior?
Any help is highly appreciated!
Best regards, Stefan

 Accepted Answer

If you look at equation 6-14 in the line search algorithm you see that it uses the gradient at the points along the line. So I believe that you do indeed need to calculate the gradients for these points. However, I have not checked the code in detail, so there is a chance that I am wrong here.
Alan Weiss
MATLAB mathematical toolbox documentation

More Answers (0)

Tags

Asked:

on 9 Sep 2014

Answered:

on 9 Sep 2014

Community Treasure Hunt

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

Start Hunting!