help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Fitting biexponential decay


From: Martin Jansche
Subject: Re: [Help-gsl] Fitting biexponential decay
Date: Tue, 22 Jan 2008 09:58:34 -0500

On Jan 22, 2008 9:09 AM, Totte Karlsson <address@hidden> wrote:

> Now I need to find a fitter for a bi exponential decay function, i.e.
>
> y(t) = A1exp{-lambda_1*t} + A2exp{-lambda_2*t}.
>
> In the equation, the A1 and A2 will typically be equal ,(A1 == A2) and
> initially set to 1, so the fit will be for lambda_1 and lambda_2.

You can use the multidimensional minimizer API
(http://www.gnu.org/software/gsl/manual/html_node/Multidimensional-Minimization.html)
to optimize the goodness of fit as a function of your two parameters.
You'll have to implement a function which evaluates goodness of fit
for your set of observation and choice of parameters, as well as the
two partial derivatives in lambda_i.  Your decay function has simple
partial derivatives; if your fit criterion does too, you're in very
good shape.  If your fit criterion is least squares, you can also use
the nonlinear least-squares fitting API
(http://www.gnu.org/software/gsl/manual/html_node/Nonlinear-Least_002dSquares-Fitting.html).

-- mj




reply via email to

[Prev in Thread] Current Thread [Next in Thread]