Non linear constrained fit (least squares): optimization algorithm.
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a data set (ydat, xdat) and I want to fit on it a function y=f (x, par) where par stands for a vector of 15 parameters.
I would like to put constraints on my parameters and to obtain parameters errors.
I am currently using fminsearch (which implements the search for the minimum with the Nelder-Mead algorithm) to minimize the mean squares, but I'd like to use a more sophisticated algorithm, something for global optimization, like genetic algorithms or simulated annealing.
Do you have any suggestion? Which algorithm do you think would work best and which function would you suggest me to use? Thanks in advance!
2 commentaires
Are Mjaavatten
le 20 Mar 2016
John von Neuman said:
With four parameters I can fit an elephant, and with five I can make him wiggle his trunk.
It seems to me that your function is overly complex, and even if you manage to make a decent fit for your data set, you have no guarantee the same parameters will be relevant for new data. You should consider reducing the complexity by simplifying the function or determining a number of parameters by other means.
You could try lsqcurverfit or lsqnonlin from the optimzation toolbox.
Réponses (0)
Voir également
Catégories
En savoir plus sur Least Squares 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!