How does fit.m determine starting points for exponential function parameters?

2 Ansichten (letzte 30 Tage)
The curvefitting toolbox has a "fit.m" function that can fit various linear and nonlinear functions. It has single and double exponential model functions. While you can specify starting points for the parameters, fit.m can determine the initial values for the search. The doc says: "If no start points (the default value of an empty vector) are passed to the fit function, starting points for some library models are determined heuristically. For rational and Weibull models, and all custom nonlinear models, the toolbox selects default initial values for coefficients uniformly at random from the interval (0,1)..." Can anyone point me to the code that actually does this "heuristic" determination of the starting point values? I can't find it in fit.m itself, although it's a large file. Thanks much for any help. (I'm using 2016a.)

Akzeptierte Antwort

Peter Weigel
Peter Weigel am 15 Jul. 2017
Hi,
I believe what you're looking for is located in fittype/private/sethandles. If you type: "open fittype/private/sethandles" into the command prompt then the file will open for you (no need to dig through the MATLAB folders).
  1 Kommentar
Tony Pryse
Tony Pryse am 18 Jul. 2017
Thanks Peter! This Matlab file (fittype/private/sethandles) refers to the paper: "Initial Values for the Exponential Sum Least Squares Fitting Problem" by Joran Petersson and Kenneth Holmstrom, and implements the methods in it. I think I ran across this paper some years ago, and it's good to know how Matlab uses it.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

giuseppe cardone
giuseppe cardone am 21 Mär. 2017
Did you solve the problem?
  2 Kommentare
Tony Pryse
Tony Pryse am 21 Mär. 2017
Nope, still don't know how they do it, and there certainly doesn't seem to be much interest in the question as posted, judging from the lack of comments or answers. Oh, well ...
Laure A
Laure A am 23 Mär. 2017
Hi,
I'm also looking for help on this point, since "exp1 fit" on some of my data also returns an error on starting points. My issue is precisely that this fit function works for some data and not for others, and I don't know why. Besides, doing the fit in "curve fitting tool" on the same data (not launching the funtion) does work, which is thus confusing...

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox 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