Non linear constrained fit (least squares): optimization algorithm.

11 visualizzazioni (ultimi 30 giorni)
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 Commenti
Are Mjaavatten
Are Mjaavatten il 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.
Sofia Valenti
Sofia Valenti il 21 Mar 2016
Modificato: Sofia Valenti il 21 Mar 2016
I know that it is too complex, I thought I might try to fit some parameters separately (which is something I could do since my function is a sum of three different peaks representing three different relaxations).
Also, with fminsearch, it gave pretty decent results but the fact that I can't put constraints on parameters is a problem, because my solution may be a local minimum that doesn't make sense.
Thanks for the advice though! I'll look up those two functions on the documentation.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by