fitting function with many parameters (fminsearch)

11 vues (au cours des 30 derniers jours)
gianluca messina
gianluca messina le 27 Fév 2013
Hi guys,
I am fitting diffraction data using a custom-made function. The solver I am using is fminsearch, which searches the zero of the funcion sse = sum( (log(fitted_curve) - log(data))^2 ).
There are 14 parameters,and the function is made of a summation. The starting parameters are very close to a good solution. I don't understand why fminsearch only varies some parameters, leaving others unchanged even if they aren't optimal.
Are there too many parameters?
Any ideas?
Regards,
Gianluca

Réponse acceptée

Miroslav Balda
Miroslav Balda le 27 Fév 2013
This may happen, if there are order differences among values of unknown parametres. Let's assume those parameters are gathered in a vector p and an initial guess is in p0. The situation may dramatically change, if we work with normalized parameters starting with a normalized vector of unknowns p=ones(n,1), however working with p=p.*p0 inside a user's function, that is called from fminsearch. After the optimum (normalized) parameters p be returned, the real optimum parameters p_opt=p.*p0.
  1 commentaire
gianluca messina
gianluca messina le 27 Fév 2013
It's working now!
Thanks a lot for your help

Connectez-vous pour commenter.

Plus de réponses (1)

Matt J
Matt J le 27 Fév 2013
Modifié(e) : Matt J le 27 Fév 2013
14 parameters is a lot for FMINSEARCH. You also need to be careful of quantization operations like ROUND, CEIL, etc... in your "fitted_curve". They can make the function locally flat, so that perturbing some/all parameters doesn't improve the function. You could plot your objective as a function of the parameters that are giving you problems (keeping the other parameters fixed). This would show you whether the parameters are sitting on a flat shelf.

Catégories

En savoir plus sur Oceanography and Hydrology 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!

Translated by