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

11 Ansichten (letzte 30 Tage)
Sofia Valenti
Sofia Valenti am 20 Mär. 2016
Bearbeitet: Sofia Valenti am 21 Mär. 2016
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
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.
Sofia Valenti
Sofia Valenti am 21 Mär. 2016
Bearbeitet: Sofia Valenti am 21 Mär. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

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!

Translated by