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
0 个评论
采纳的回答
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.
0 个评论
更多回答(1 个)
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:
- 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.
- 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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!