Non linear constrained fit (least squares): optimization algorithm.
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Are Mjaavatten
am 20 Mär. 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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Least Squares finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!