How to calculate the exponential regression with the following

exponential functiongraphing-functionsregression

Not sure where to ask but I have a task to calculate the exponential function for curve fitting.

So I have this exponential function: v(x)=a-(b*exp(-d*x))

I wanted to find the a, b and d with the following points (x and y):


[0.33, 0.09964675364309147]
[0.66, 0.10389448386358434]
[0.99, 0.10724269474326696]
[1.32, 0.1081921873807889]
[1.6500001, 0.10984130617227435]
[1.98, 0.11308957045853361]
[2.3100002, 0.11663767452506293]
[2.64, 0.11928625925078204]
[2.97, 0.12188487067978944]
[3.3000002, 0.1245334554055085]
[3.63, 0.1268822003509575]
[3.96, 0.1292309452964065]
[4.29, 0.13142977035172046]
[4.6200004, 0.13372854200045778]
[4.9500003, 0.13537766079194324]
[5.28, 0.13752651255054554]
[5.61, 0.13952544441901277]
[5.94, 0.14157434958419166]
[6.2700005, 0.14422293430991076]

gnu plot results:


a = 0.23596
b = 0.138802
d = 0.072086

This was easily calculated via gnuplot, if you do not know what it is, it is a program that generate plots, calculate fit, and more. But in my case I wanted to manually calculate it, at least for the a, b and d.

Best Answer

They are several methods of regression which gives approximates of the parameters of the supposed convenient function. Each method has specific advantage and drawback. You have to understand that it is not serious to propose a particular method without information about the context. That is why a representative example of data (not a no significative one) is a useful information to give a pertinent answer and an example of numerical calculus helping to apply without mistake the proposed method with other data.

The fonction that you chose to be fitted is non-linear. Generally the usual methods of regression involve an iterative process and require initial guess of the parameters (by the user or by various kind numerical approaches).

A special direct method (i.e. not iterative, no initial guess required) exists. But I am reluctant to propose it without estimating the advantages and drawbacks in a specific context.

Nevertheless, this regression method is summarized below. Without more information about your case of application, one cannot say if this method will be accurate enough for you.

enter image description here

This comes from : https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales

LATTER ADDITION.

With the data provided in the OP question :

enter image description here NOTE : Probably there is something wrong in the use of gnuplot or in the transcription of the results from gnuplot because the fitting should be better than the blue curve. Please, check the gnuplot calculus and the copy of the numerical results.

NOTE : With the very simple method proposed above, the fitting appears satisfactory (red curve). If you need more accuracy according to some specific criteria of mean error (absolute or relative or other criteria) one need a non-linear fitting method. I suppose that gnuplot could be able to do that. If not, try more efficient regression packages.

DETAILS OF COMPUTATION :

enter image description here

Related Question