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

11 次查看(过去 30 天)
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 个评论
Are Mjaavatten
Are Mjaavatten 2016-3-20
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 2016-3-21
编辑:Sofia Valenti 2016-3-21
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Least Squares 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by