MATLAB Answers

nonlinear minimization with fminunc

4 views (last 30 days)
Daniel
Daniel on 24 Jul 2014
Commented: Shashank Prasanna on 24 Jul 2014
Hi All:
I am doing parameterization by minimizing a nonlinear target function. However, after the iteration runs, it returns the following message. And returns with the initial values for the parameters that I set.
*Iteration Func-count f(x) Step-size optimality
0 9 1.46536 7.77e+06
1 144 1.39431 1.57417e-14 5.47e+06
Local minimum possible.
fminunc stopped because the size of the current step is less than the default value of the step size tolerance.*
There is no error in the code. What do you suggest to solve this issue?
Thank you!

Answers (2)

Matt J
Matt J on 24 Jul 2014
Evaluate the gradient at the initial point and see if it is close to zero. Also, call fminunc with all of its output arguments,
[x,fval,exitflag,output,grad,hessian]= fminunc(...)
to get more diagnostic information.
  2 Comments
Matt J
Matt J on 24 Jul 2014
I'm guessing your function may not be differentiable. A local minimum of a twice continuously differentiable function should have a positive semi-definite Hessian and gradient near zero. It appears you are far from either.

Sign in to comment.


Shashank Prasanna
Shashank Prasanna on 24 Jul 2014
Edited: Shashank Prasanna on 24 Jul 2014
The optimization stopped because size of the current step is less than the default value. However you can change the defaults.
I suggest you read the following articles in the link below:
  • When the Solver Fails
  • When the Solver Might Have Succeeded
  • When the Solver Succeeds
There are guidelines on what you can try in each of the situations.
  2 Comments
Shashank Prasanna
Shashank Prasanna on 24 Jul 2014
fminunc is a derivative based optimizer. If you have discontinuous objective surface or have multiple optimums then fminunc becomes sensitive to initial start points. If you do have an exotic objective function I recommend trying multistart or patternsearch which does better at finding "global" optimum solutions.
Local vs Global:

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!