Solution very sensitive to initial guess?

13 次查看(过去 30 天)
I am using fminunc and trying to minimize a sum of squared errors between experimental and model data in order to estimate the values of 4 parameters used in a differential equation. The differential equation is stiff and requires ODE23S. I notice that the minimized value and value of the 4 parameters that matlab gives as output is very sensitive to the initial guess values of the parameters that I input into fminunc. Also, (expectedly) MATLAB says the sum of squared errors it finds is a local minimum. So my question(s) are: a) What can I do so that regardless of what my initial guess of the parameters values are(of course, the guess should be within reason ), MATLAB gives the same minimized value and the same 4 parameter values. b) Can MATLAB find a global minimum for the sum of squared errors?
Thank you Soham

采纳的回答

Walter Roberson
Walter Roberson 2015-8-11
fminunc is never a global minimizer (except, of course, when the only local minima is also the global minima.)
Have you experimented with fminsearch() ?
You should probably be using the Global Optimization toolbox for a global minimization.

更多回答(1 个)

Alan Weiss
Alan Weiss 2015-8-17
I am not sure that this will help, but I can suggest two things that have a chance of improving things for you:
  1. Use lsqnonlin, not fminunc. You will probably get faster, more reliable results. You will have to rewrite your objective function to give the vector of things that you square and sum for fminunc, because lsqnonneg wants that vector as the objective, not the sum of squares.
  2. Be careful and choose appropriate finite difference step sizes, as explained here.
And, as explained here, no Optimization Toolbox solver gives global solutions, only local, so you might have to take a variety of initial points to increase the likelihood that you arrive at the global minimum.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  1 个评论
Soham
Soham 2015-9-4
Alan,
Thanks a lot and sorry for the late reply. Yes, I have started using lsqnonlin and it is giving faster/better results although not always (again dependent on initial conditions). I plan to use Multistart in order to study a number of points.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by