Solution very sensitive to initial guess?
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Walter Roberson
le 11 Août 2015
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 commentaires
Plus de réponses (1)
Alan Weiss
le 17 Août 2015
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
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!