# Is it possible to find initial parameters when fitting triple exponential term function to data?

I'm trying to fit $f(x) = A \exp(Bx) + C \exp(Dx) + E \exp(F x)$ to data. I can finish off the fitting using Levenberg-Marquardt, but I'd like to find a quick way to calculate initial parameters.

Can the method detailed by JJacquelin be expanded from two to three terms? Would it need SSS and SSSS? Thank you :)

Regressions-et-equations-integrales

• Yes, the method based on integral equation works with the three terms. As you expect, it needs numerical integrations up to the quadruple integral. From my practical experience, the deviations due to multiple integrations are cumulative and causes some trouble which importance depends on the context. If the experimental data is well distributed with low noise, the results can be rather good. Unfortunately, in some other cases, the four successive numerical integrations are not accurate enough to lead to robust results. If you post an example of data, I could check with my available sofware. – JJacquelin Aug 7 '15 at 14:55
• I just now see that data can be found on your github page. I tested your Data1.in : In order to show the result I give a new answer. It seems that the data might be not experimental, but coming from simulation by numerical computation (too good fit). – JJacquelin Aug 7 '15 at 17:44
• Hi Jean, I see what you mean about the noise, and yes the data I prepared is all exact (although I could generate some with some noise and see if I can fit to that too). – benpalmer Aug 7 '15 at 17:59
• I don't know how to post on the forum the paper where the method of fitting is explained in full details. It is a ms-word document .docx that I could made on PDF form. – JJacquelin Aug 7 '15 at 18:06
• I'll try to open a chat on here. I've also added a new data file to my git hub (data7.in) and these are my fit results: – benpalmer Aug 7 '15 at 18:17

A quick and dirty way which works.

If $B,D,F$ are known, the problem reduces to a linear regression. So, make a three dimension grid and for each triplet compute the sum of squares until you find a minimum. For the best triplet, recompute $A,C,D$ and start the nonlinear regression.

Because of symmetry, you must not compute all points. Suppose that you start the search at $B=V$ and you want to perform $N$ evaluations using a step size of $DV$, then the structure of the loops would be something like

 DO IB = 1 , N-2
B = V + (IB - 1) * DV
DO ID = IB+1 , N-1
D = V + ID * DV
DO IF = ID + 1 , N
F = V + IF * DV
compute SSQ by linear regression
ENDDO
ENDDO
ENDDO


The fitting of your data1 (from github) with the method based on an integral equation is shown below. I will try to joint a paper "Triple exponential.docx" where one can find the method of fitting (In French, but the equations are lisible on other languages)

Latter on, a new data set was proposed (Data7 from github), with small scatter. The results below corresponds to the cases of 2 and 3 exponentials, with or without a constant (4, 5, 6 or 7 parameters to compute).

• I was waiting for an answer from you ! Can I get a copy of the PDF (better for me) ? Thanks and Cheers :-) – Claude Leibovici Aug 8 '15 at 5:21
• Hi Claude ! I seed you the PDF right now. Cheers. – JJacquelin Aug 8 '15 at 8:22

I've used Claude's algorithm in a Fortran program to fit three and four exp term functions to data (on my github page):

expFit