1
$\begingroup$

I've got a sample curve which ends theoretically with decreasing exponential. The curve end falls into noise. The sample points are given in log scale. What I want to do, is to find and fit the linear part of the log curve to retrieve the exponential factor. The trick is that I don't know the starting point neither the ending point of the linear part of the log curve.

The strategy I'm using is to fit a line at each point with at least say 20 points and until the end of the curve is reached. Then from all these regressions, I keep the one with the best determination coefficient.

I did several tests and found that the RMS error increases with the number of points systematically as the curve becomes more and more noisy, so the extracted factor is always computed on the minimum number of samples (20 in this example case).

My question is, is there a more efficient method to compute this factor ? Does increasing the minimum number of samples improve the accuracy of the fit ?

Here a sample curve I want to fit

sample curve

The computed slope regarding the position in the curve

slope

And the corresponding RMS error

enter image description here

$\endgroup$
1
$\begingroup$

A useful approach could be to take the numerical derivative of the function. Then you will get some constant line at some $y=a$, where $a$ is non-zero. This would help to eliminate all the other parts and to determine the starting and eding points of the line.

About the fit Matlab has a polyfit command. If the curve of interest is linear than basically this command with parameter $2$ as input will give you the pair $(a,b)$ s.t. the best $ax+b$ fits into the numberical numbers that you provide.

$\endgroup$
0
$\begingroup$

Have you tried the "normal probability plot" or as referred to nowadays qqnorm programs? You plot the data horizontally and vertically you plot the test distribution. If you are unfamiliar read: http://en.wikipedia.org/wiki/Normal_probability_plot http://www.itl.nist.gov/div898/handbook/apr/section2/apr221.htm I have used it a lot and it allows one to visually (or numerically if one is wedded to numbers) evaluate the quality of a fit. I am far more confident in my decisions when I can see the results as a graph. Process: Make a non-logarithmic model of the process; v=a*ln(f) +w where "w" is an assumed white additive Gaussian noise and "a" is the parameter of be estimated. Solve for "a": a=(v-w)/ln(f) and plot using data from a "window" where you think the model is correct. See if you have a straight line; or straight enough for your purposes. If so you can read off the SD and average slope immediately; although I would vary the window size to make sure that estimate is converging as the size gets smaller. If the fit/"straightness" isn't good enough try another model or assumed PDF and repeat. End process: It's really fun. As they say in war; no model survives it's first encounter with data :) In other words: you need an approach that's adaptable for the particular data you have in hand.
Probability/qqnorm plotting provides that. If you do it in the R language it has an enormous number of PDF's you can try against one model; together with an impressive online community. The NIST dataplot program also have a reasonable number of pdf's. I can offer help if needed but I think it would be far..far better if you mastered it; presuming you haven't done it already. Of course: YMMV

$\endgroup$
0
$\begingroup$

A simple solution to this problem would be to fit the data to a decaying exponential taking all the data in the beginning and then less and less until the error is minimal. Then when you have the best decaying exponential parameters you can predict values where there's noise.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.